Compare commits
	
		
			2203 Commits
		
	
	
		
			mesa_3_2_1
			...
			mesa_4_0_4
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					61b226a4f4 | ||
| 
						 | 
					adc4d21dbb | ||
| 
						 | 
					efaa8be77f | ||
| 
						 | 
					ed7b3b61f5 | ||
| 
						 | 
					17d73e49c8 | ||
| 
						 | 
					032341cbea | ||
| 
						 | 
					53170a3af0 | ||
| 
						 | 
					57181b2c0a | ||
| 
						 | 
					00a1ff66e2 | ||
| 
						 | 
					635e8c3459 | ||
| 
						 | 
					6d99cffed3 | ||
| 
						 | 
					9c16911e06 | ||
| 
						 | 
					0de37dcc2e | ||
| 
						 | 
					a53dccf9c5 | ||
| 
						 | 
					3291a3c69c | ||
| 
						 | 
					d2fba8a633 | ||
| 
						 | 
					8d7ed801a5 | ||
| 
						 | 
					689a803c90 | ||
| 
						 | 
					8365cbbc85 | ||
| 
						 | 
					baa9451a93 | ||
| 
						 | 
					79c9cca366 | ||
| 
						 | 
					14b30bace0 | ||
| 
						 | 
					1c6b172c01 | ||
| 
						 | 
					da1a6739fe | ||
| 
						 | 
					15b418be49 | ||
| 
						 | 
					33629a0d70 | ||
| 
						 | 
					d8f5422a37 | ||
| 
						 | 
					b83df71385 | ||
| 
						 | 
					b7f6f84fc2 | ||
| 
						 | 
					50cd089a7f | ||
| 
						 | 
					7e22bad6da | ||
| 
						 | 
					7d46390bd4 | ||
| 
						 | 
					3580b7a3d3 | ||
| 
						 | 
					c383ce0e0f | ||
| 
						 | 
					a10727eedc | ||
| 
						 | 
					d4c7dd076c | ||
| 
						 | 
					1e57a87e6a | ||
| 
						 | 
					6080451f93 | ||
| 
						 | 
					5419097b37 | ||
| 
						 | 
					889b6c4e7a | ||
| 
						 | 
					58be490b08 | ||
| 
						 | 
					d314643448 | ||
| 
						 | 
					a28d96bd0e | ||
| 
						 | 
					6d3c1ec7cd | ||
| 
						 | 
					aa80a17ad0 | ||
| 
						 | 
					1509a4399a | ||
| 
						 | 
					c2065e3ea5 | ||
| 
						 | 
					ba35bb6897 | ||
| 
						 | 
					eefdfddd3e | ||
| 
						 | 
					00068e6686 | ||
| 
						 | 
					1c1f60d437 | ||
| 
						 | 
					476c1fdbc6 | ||
| 
						 | 
					5613f469d7 | ||
| 
						 | 
					6338c52cd4 | ||
| 
						 | 
					c4c5e26cc7 | ||
| 
						 | 
					b6454b19ae | ||
| 
						 | 
					84c56fef84 | ||
| 
						 | 
					a2bb621983 | ||
| 
						 | 
					d057db7942 | ||
| 
						 | 
					5c04890c5f | ||
| 
						 | 
					fb3475078d | ||
| 
						 | 
					ea214a755b | ||
| 
						 | 
					8af93aa529 | ||
| 
						 | 
					ab81956422 | ||
| 
						 | 
					38a30cfef0 | ||
| 
						 | 
					e95e02331e | ||
| 
						 | 
					9636b9aa25 | ||
| 
						 | 
					f610b8f418 | ||
| 
						 | 
					601fd74868 | ||
| 
						 | 
					36ee4317c2 | ||
| 
						 | 
					9d4181cd56 | ||
| 
						 | 
					cf1dc9faf9 | ||
| 
						 | 
					6fa2c761a1 | ||
| 
						 | 
					d9c191f2ad | ||
| 
						 | 
					36b477442f | ||
| 
						 | 
					95358c87ef | ||
| 
						 | 
					829ca52b1a | ||
| 
						 | 
					767b8b6b81 | ||
| 
						 | 
					634d720426 | ||
| 
						 | 
					72dcd2b1b0 | ||
| 
						 | 
					b60335f125 | ||
| 
						 | 
					3e78e05a4c | ||
| 
						 | 
					1099dcdc09 | ||
| 
						 | 
					a73bc7e9ce | ||
| 
						 | 
					19f17185bd | ||
| 
						 | 
					22f431fc84 | ||
| 
						 | 
					5538b98051 | ||
| 
						 | 
					f2acb26f16 | ||
| 
						 | 
					6d0fd19a71 | ||
| 
						 | 
					670ea9f590 | ||
| 
						 | 
					c3be87b84b | ||
| 
						 | 
					a4d34a5688 | ||
| 
						 | 
					e64e5f5529 | ||
| 
						 | 
					4266ec91fe | ||
| 
						 | 
					8a5bdd826a | ||
| 
						 | 
					20cbbf8459 | ||
| 
						 | 
					2847895a03 | ||
| 
						 | 
					79d05b5649 | ||
| 
						 | 
					a0ad8d5a8a | ||
| 
						 | 
					1a9198f118 | ||
| 
						 | 
					dd8fbed413 | ||
| 
						 | 
					972cc7827f | ||
| 
						 | 
					263d8ff8e3 | ||
| 
						 | 
					363c8b9048 | ||
| 
						 | 
					eb7b122807 | ||
| 
						 | 
					6306085c69 | ||
| 
						 | 
					7e20f99f81 | ||
| 
						 | 
					a79f7f8838 | ||
| 
						 | 
					d1d4f6bd34 | ||
| 
						 | 
					640f61ba13 | ||
| 
						 | 
					07e3f72bf8 | ||
| 
						 | 
					d06d24f497 | ||
| 
						 | 
					3fa786c175 | ||
| 
						 | 
					984bb590df | ||
| 
						 | 
					67c5effe5c | ||
| 
						 | 
					fbe488cb76 | ||
| 
						 | 
					dbd36a0ca0 | ||
| 
						 | 
					076870f384 | ||
| 
						 | 
					c1fba8241b | ||
| 
						 | 
					690798ae3b | ||
| 
						 | 
					89e91fcc9a | ||
| 
						 | 
					d5a8eeaeeb | ||
| 
						 | 
					b118f433e1 | ||
| 
						 | 
					fbbb780e1f | ||
| 
						 | 
					9429860763 | ||
| 
						 | 
					531af3f17f | ||
| 
						 | 
					054f415f45 | ||
| 
						 | 
					b1b4382283 | ||
| 
						 | 
					3aef708b56 | ||
| 
						 | 
					d63730d087 | ||
| 
						 | 
					2469fc9672 | ||
| 
						 | 
					86ab257a46 | ||
| 
						 | 
					d7e7d8ec74 | ||
| 
						 | 
					fe4edce605 | ||
| 
						 | 
					b0f477e5dd | ||
| 
						 | 
					ce4c38fe2e | ||
| 
						 | 
					09760a9563 | ||
| 
						 | 
					d7abab5c67 | ||
| 
						 | 
					e900da049b | ||
| 
						 | 
					9def08ad3d | ||
| 
						 | 
					978731595d | ||
| 
						 | 
					00e5cb4120 | ||
| 
						 | 
					b338ee265a | ||
| 
						 | 
					8d3f06a565 | ||
| 
						 | 
					0d1785c6db | ||
| 
						 | 
					79474dc528 | ||
| 
						 | 
					43e90c0053 | ||
| 
						 | 
					c748b6c3d8 | ||
| 
						 | 
					2c109c15e0 | ||
| 
						 | 
					22fcb86432 | ||
| 
						 | 
					70c5d68365 | ||
| 
						 | 
					1b0fcb2124 | ||
| 
						 | 
					6668d2fcb1 | ||
| 
						 | 
					e3c2d6bd0c | ||
| 
						 | 
					655e0ad0c1 | ||
| 
						 | 
					d99fa29b94 | ||
| 
						 | 
					7229861a46 | ||
| 
						 | 
					f5130e3473 | ||
| 
						 | 
					a5ed2460e9 | ||
| 
						 | 
					e2130abf8f | ||
| 
						 | 
					bf6a6f1d59 | ||
| 
						 | 
					abd10c99e5 | ||
| 
						 | 
					c3bc8a9c1e | ||
| 
						 | 
					aa5698e8ed | ||
| 
						 | 
					cf4c9ada0d | ||
| 
						 | 
					13c751a1c2 | ||
| 
						 | 
					2af71a9acf | ||
| 
						 | 
					5e0316f1a8 | ||
| 
						 | 
					2366fb3b89 | ||
| 
						 | 
					4ad3511865 | ||
| 
						 | 
					44f6191507 | ||
| 
						 | 
					aaf89c1cc7 | ||
| 
						 | 
					7350dd7395 | ||
| 
						 | 
					972815c414 | ||
| 
						 | 
					0bb0b4df73 | ||
| 
						 | 
					e07b4252ad | ||
| 
						 | 
					b8855675ca | ||
| 
						 | 
					6bf823ac2d | ||
| 
						 | 
					af3f3080f9 | ||
| 
						 | 
					bb47715320 | ||
| 
						 | 
					cef9cdf3bb | ||
| 
						 | 
					4493f41577 | ||
| 
						 | 
					a4f3130a7f | ||
| 
						 | 
					b2c3daa875 | ||
| 
						 | 
					3d6951c097 | ||
| 
						 | 
					db0ed6252b | ||
| 
						 | 
					e6c59e8d0c | ||
| 
						 | 
					378fcdb818 | ||
| 
						 | 
					cd3f5d807a | ||
| 
						 | 
					c3e908891c | ||
| 
						 | 
					fdbaf407a7 | ||
| 
						 | 
					5a86d3852c | ||
| 
						 | 
					96d0be5cf2 | ||
| 
						 | 
					0bd26c3c55 | ||
| 
						 | 
					9f7053e913 | ||
| 
						 | 
					9fa55ac457 | ||
| 
						 | 
					101092ea11 | ||
| 
						 | 
					da648d9afd | ||
| 
						 | 
					7a3b7c9687 | ||
| 
						 | 
					55f8fcba10 | ||
| 
						 | 
					7419597f2f | ||
| 
						 | 
					e784671997 | ||
| 
						 | 
					c2165e799c | ||
| 
						 | 
					40519b3eb3 | ||
| 
						 | 
					dcda68de33 | ||
| 
						 | 
					8308199e5d | ||
| 
						 | 
					3b029b0c7d | ||
| 
						 | 
					bff7677bd9 | ||
| 
						 | 
					41796ecc25 | ||
| 
						 | 
					94865a95b1 | ||
| 
						 | 
					b8b23d4552 | ||
| 
						 | 
					3245cfdf41 | ||
| 
						 | 
					69e043158a | ||
| 
						 | 
					3ce17ffb84 | ||
| 
						 | 
					33b483f882 | ||
| 
						 | 
					308a036114 | ||
| 
						 | 
					4c97c84f7e | ||
| 
						 | 
					d7bde06097 | ||
| 
						 | 
					a00292bcfe | ||
| 
						 | 
					7d729ffb58 | ||
| 
						 | 
					aeb6c0af5e | ||
| 
						 | 
					41110917d7 | ||
| 
						 | 
					a58b1ed0a3 | ||
| 
						 | 
					27b503cab8 | ||
| 
						 | 
					d38cdd33d0 | ||
| 
						 | 
					851acc6ea7 | ||
| 
						 | 
					6115d784a7 | ||
| 
						 | 
					fcca385bec | ||
| 
						 | 
					06743cf365 | ||
| 
						 | 
					b372b40bd1 | ||
| 
						 | 
					3e3bd40614 | ||
| 
						 | 
					3fb6d0bfde | ||
| 
						 | 
					b36acc0423 | ||
| 
						 | 
					287d6127d2 | ||
| 
						 | 
					a8290d3a95 | ||
| 
						 | 
					b26f972618 | ||
| 
						 | 
					5bd6bad38d | ||
| 
						 | 
					1ae3437156 | ||
| 
						 | 
					93665403aa | ||
| 
						 | 
					04613cb0bc | ||
| 
						 | 
					e0a30e9d2d | ||
| 
						 | 
					fd3da01ec3 | ||
| 
						 | 
					40bbb8b7f3 | ||
| 
						 | 
					00b7772bda | ||
| 
						 | 
					0fc4d7e46d | ||
| 
						 | 
					1261fed2c3 | ||
| 
						 | 
					4f4f542bd7 | ||
| 
						 | 
					550169ab62 | ||
| 
						 | 
					ad83c33a4d | ||
| 
						 | 
					a340c4f6ef | ||
| 
						 | 
					781f27575c | ||
| 
						 | 
					08e126fba6 | ||
| 
						 | 
					b03241a552 | ||
| 
						 | 
					e4efc983bd | ||
| 
						 | 
					785bfd0c1e | ||
| 
						 | 
					a0e4612f49 | ||
| 
						 | 
					f6e1618f97 | ||
| 
						 | 
					3a450fb4b0 | ||
| 
						 | 
					43daa03ac1 | ||
| 
						 | 
					cb69912494 | ||
| 
						 | 
					b4518ee5d4 | ||
| 
						 | 
					6ef05c2817 | ||
| 
						 | 
					26d31abd87 | ||
| 
						 | 
					7702362bda | ||
| 
						 | 
					5141607357 | ||
| 
						 | 
					a9e14e7bb9 | ||
| 
						 | 
					5196a16629 | ||
| 
						 | 
					7f37280955 | ||
| 
						 | 
					986b7ec195 | ||
| 
						 | 
					9012185ae8 | ||
| 
						 | 
					2edf851932 | ||
| 
						 | 
					1703b67ee0 | ||
| 
						 | 
					9342fbe46e | ||
| 
						 | 
					2f88c5fbd4 | ||
| 
						 | 
					dc35f387ca | ||
| 
						 | 
					597ec4040c | ||
| 
						 | 
					51aa3d2f30 | ||
| 
						 | 
					0c1f42ef29 | ||
| 
						 | 
					06ae58eebb | ||
| 
						 | 
					d8deb468f7 | ||
| 
						 | 
					4aac60f691 | ||
| 
						 | 
					e20d35d74a | ||
| 
						 | 
					ed26c2d950 | ||
| 
						 | 
					95681b4a85 | ||
| 
						 | 
					17a5135fee | ||
| 
						 | 
					69b71bc1ab | ||
| 
						 | 
					9f6957e702 | ||
| 
						 | 
					bf78731523 | ||
| 
						 | 
					c527df81df | ||
| 
						 | 
					ca2315d95b | ||
| 
						 | 
					c4dd9e2a03 | ||
| 
						 | 
					34174976c4 | ||
| 
						 | 
					ff23c15bdc | ||
| 
						 | 
					eb0ce107c7 | ||
| 
						 | 
					bfe6c71b99 | ||
| 
						 | 
					69f2ff5f38 | ||
| 
						 | 
					f28c19da41 | ||
| 
						 | 
					c132ca9774 | ||
| 
						 | 
					8ca1772d4a | ||
| 
						 | 
					ff5fe4836a | ||
| 
						 | 
					f88e0898a1 | ||
| 
						 | 
					3f2eedd634 | ||
| 
						 | 
					158c7413fb | ||
| 
						 | 
					0a96860e04 | ||
| 
						 | 
					37b10249e5 | ||
| 
						 | 
					589cee71b8 | ||
| 
						 | 
					c6dcd5c4cf | ||
| 
						 | 
					e1ec4771f1 | ||
| 
						 | 
					917e942fe2 | ||
| 
						 | 
					f427427ca8 | ||
| 
						 | 
					7ed97d4ef4 | ||
| 
						 | 
					267b9cc082 | ||
| 
						 | 
					efb678da77 | ||
| 
						 | 
					32aa05bfd6 | ||
| 
						 | 
					299a71fe04 | ||
| 
						 | 
					63da26bd62 | ||
| 
						 | 
					dfb7ebf8a0 | ||
| 
						 | 
					64681c1f82 | ||
| 
						 | 
					8c3149f250 | ||
| 
						 | 
					53e284bda1 | ||
| 
						 | 
					f46ce82219 | ||
| 
						 | 
					4256cf0175 | ||
| 
						 | 
					986749a4ea | ||
| 
						 | 
					07042d164b | ||
| 
						 | 
					0739d6f158 | ||
| 
						 | 
					2fd7a602a7 | ||
| 
						 | 
					f97edb4ca3 | ||
| 
						 | 
					3b0571dd5c | ||
| 
						 | 
					c25f068355 | ||
| 
						 | 
					3a05f42b28 | ||
| 
						 | 
					2631c2a2de | ||
| 
						 | 
					b2728086ec | ||
| 
						 | 
					2e7644f13d | ||
| 
						 | 
					9c3e7d2294 | ||
| 
						 | 
					0878456b46 | ||
| 
						 | 
					3de5462ab1 | ||
| 
						 | 
					a7f8117153 | ||
| 
						 | 
					45d21ca587 | ||
| 
						 | 
					52d4c6ebb5 | ||
| 
						 | 
					12e875ce4d | ||
| 
						 | 
					5d26219288 | ||
| 
						 | 
					40ba618a6f | ||
| 
						 | 
					e8245c1409 | ||
| 
						 | 
					ebc8b0aa5a | ||
| 
						 | 
					7d63ac1e6b | ||
| 
						 | 
					fca1ce3a26 | ||
| 
						 | 
					e715c91000 | ||
| 
						 | 
					e11f089f82 | ||
| 
						 | 
					470d3cd4a2 | ||
| 
						 | 
					3d16c369d9 | ||
| 
						 | 
					b5bfe2f6ae | ||
| 
						 | 
					439ded4e2a | ||
| 
						 | 
					b66103971c | ||
| 
						 | 
					bffae58175 | ||
| 
						 | 
					3978d026ea | ||
| 
						 | 
					8f47563559 | ||
| 
						 | 
					47bcda78e2 | ||
| 
						 | 
					d3788b60ae | ||
| 
						 | 
					31c40f0905 | ||
| 
						 | 
					954f511473 | ||
| 
						 | 
					968e557dcd | ||
| 
						 | 
					b1ee387ab5 | ||
| 
						 | 
					220e77a3f7 | ||
| 
						 | 
					0e94067d0d | ||
| 
						 | 
					001f826f71 | ||
| 
						 | 
					2427575c21 | ||
| 
						 | 
					7bb6fcc19d | ||
| 
						 | 
					5734421078 | ||
| 
						 | 
					97856fd98a | ||
| 
						 | 
					5ac8282a22 | ||
| 
						 | 
					a573803ed3 | ||
| 
						 | 
					78a03d3c45 | ||
| 
						 | 
					497d6eab66 | ||
| 
						 | 
					05ba9becc3 | ||
| 
						 | 
					445e3cbd0d | ||
| 
						 | 
					38112f5b60 | ||
| 
						 | 
					80d5855692 | ||
| 
						 | 
					448b88bb80 | ||
| 
						 | 
					cfe52d8ae0 | ||
| 
						 | 
					f2a50b141e | ||
| 
						 | 
					8674e709ee | ||
| 
						 | 
					62eb2e5909 | ||
| 
						 | 
					fffc27015b | ||
| 
						 | 
					7152305e0a | ||
| 
						 | 
					7c4268176e | ||
| 
						 | 
					2fc06af470 | ||
| 
						 | 
					b6bcfc1f6a | ||
| 
						 | 
					37f2d5e696 | ||
| 
						 | 
					7b9fe820a3 | ||
| 
						 | 
					c98541f54b | ||
| 
						 | 
					e9479f24ab | ||
| 
						 | 
					573dd2206b | ||
| 
						 | 
					4742735a5c | ||
| 
						 | 
					b14dcea418 | ||
| 
						 | 
					94a6ec8f0c | ||
| 
						 | 
					57c946096e | ||
| 
						 | 
					fde5e2c5f1 | ||
| 
						 | 
					1f20952a92 | ||
| 
						 | 
					04120f6cce | ||
| 
						 | 
					7c276329e8 | ||
| 
						 | 
					edf8c06270 | ||
| 
						 | 
					7cc49c2dc8 | ||
| 
						 | 
					5ce1f374da | ||
| 
						 | 
					675343c517 | ||
| 
						 | 
					94666c4b55 | ||
| 
						 | 
					ba57e5297d | ||
| 
						 | 
					dcbe4d6d2f | ||
| 
						 | 
					d22554d2ce | ||
| 
						 | 
					097d2a025e | ||
| 
						 | 
					e79f4b08d5 | ||
| 
						 | 
					517903edcd | ||
| 
						 | 
					306933046c | ||
| 
						 | 
					30230a9cd1 | ||
| 
						 | 
					9348cfc6e8 | ||
| 
						 | 
					190d34874c | ||
| 
						 | 
					62f75054cb | ||
| 
						 | 
					7d5656bee7 | ||
| 
						 | 
					7e975ba3aa | ||
| 
						 | 
					9bed64cbf1 | ||
| 
						 | 
					04ec0fd71e | ||
| 
						 | 
					a0037ad8b3 | ||
| 
						 | 
					a07e02fd01 | ||
| 
						 | 
					0d6fd15840 | ||
| 
						 | 
					a8b07a539b | ||
| 
						 | 
					2a88946f9a | ||
| 
						 | 
					afe4f5e6c1 | ||
| 
						 | 
					e7df7cd6ad | ||
| 
						 | 
					c123a9b2ed | ||
| 
						 | 
					9babb73789 | ||
| 
						 | 
					d9fc8e20e3 | ||
| 
						 | 
					ac6daf97e1 | ||
| 
						 | 
					df631a866d | ||
| 
						 | 
					233aafbb30 | ||
| 
						 | 
					fc1eadefeb | ||
| 
						 | 
					976c26ca34 | ||
| 
						 | 
					60174c1aef | ||
| 
						 | 
					76a52525c7 | ||
| 
						 | 
					bd9b4056d7 | ||
| 
						 | 
					3d1df5554e | ||
| 
						 | 
					9a90775010 | ||
| 
						 | 
					b1a2393bb7 | ||
| 
						 | 
					c8a27838a0 | ||
| 
						 | 
					d922109eb3 | ||
| 
						 | 
					978a2a0a43 | ||
| 
						 | 
					2e5a20ae21 | ||
| 
						 | 
					b22fe91cdb | ||
| 
						 | 
					8b59b52297 | ||
| 
						 | 
					58cfa0fd90 | ||
| 
						 | 
					c6182ab54c | ||
| 
						 | 
					94f494e780 | ||
| 
						 | 
					ebc9f221b2 | ||
| 
						 | 
					b5797a5085 | ||
| 
						 | 
					696cd3d2b6 | ||
| 
						 | 
					bb40d07830 | ||
| 
						 | 
					5e1680ce1d | ||
| 
						 | 
					636fb6cae7 | ||
| 
						 | 
					84170351db | ||
| 
						 | 
					76ca0f5232 | ||
| 
						 | 
					554ceab8ec | ||
| 
						 | 
					51184566fb | ||
| 
						 | 
					c618005dcf | ||
| 
						 | 
					3670e206a7 | ||
| 
						 | 
					46af1f87c8 | ||
| 
						 | 
					616f470629 | ||
| 
						 | 
					2f65b316ff | ||
| 
						 | 
					8a8d474068 | ||
| 
						 | 
					dae1774e20 | ||
| 
						 | 
					086f1b8428 | ||
| 
						 | 
					24d9350897 | ||
| 
						 | 
					73fc243420 | ||
| 
						 | 
					172281dad8 | ||
| 
						 | 
					e2df5de01c | ||
| 
						 | 
					d4cff4f2fa | ||
| 
						 | 
					bbf6a41d2f | ||
| 
						 | 
					62c734f499 | ||
| 
						 | 
					ae40b2281d | ||
| 
						 | 
					3c03f3232d | ||
| 
						 | 
					4fa5c1966a | ||
| 
						 | 
					55180f4b92 | ||
| 
						 | 
					f3b85c983f | ||
| 
						 | 
					89480f7382 | ||
| 
						 | 
					46e6c7ad54 | ||
| 
						 | 
					48f3bdaeb3 | ||
| 
						 | 
					fd28445e10 | ||
| 
						 | 
					2a9eca0ed4 | ||
| 
						 | 
					3b925120a6 | ||
| 
						 | 
					277fd2e66e | ||
| 
						 | 
					5356031129 | ||
| 
						 | 
					4ae22b9721 | ||
| 
						 | 
					461b990508 | ||
| 
						 | 
					a1503b00f8 | ||
| 
						 | 
					fba5e95468 | ||
| 
						 | 
					96385fa155 | ||
| 
						 | 
					274fc30d31 | ||
| 
						 | 
					ac3958ea1b | ||
| 
						 | 
					ee6cf4c6b0 | ||
| 
						 | 
					601ce1d624 | ||
| 
						 | 
					5b22aa1e33 | ||
| 
						 | 
					f431a3fb4d | ||
| 
						 | 
					bc07a99cc3 | ||
| 
						 | 
					cff1cfd90d | ||
| 
						 | 
					5c749d9e3c | ||
| 
						 | 
					b23f5b5a5c | ||
| 
						 | 
					77a4754d73 | ||
| 
						 | 
					0cab1db776 | ||
| 
						 | 
					1182ffeec3 | ||
| 
						 | 
					fae7b778b8 | ||
| 
						 | 
					571c8ecc8f | ||
| 
						 | 
					ac54173414 | ||
| 
						 | 
					5233ca8d30 | ||
| 
						 | 
					8564f0536b | ||
| 
						 | 
					47a28c0b4d | ||
| 
						 | 
					206eda8b69 | ||
| 
						 | 
					9c38ae35eb | ||
| 
						 | 
					acc722d4b8 | ||
| 
						 | 
					33170eeb18 | ||
| 
						 | 
					4f76d0e215 | ||
| 
						 | 
					8c2f6c5059 | ||
| 
						 | 
					657323bf03 | ||
| 
						 | 
					5e7591f94c | ||
| 
						 | 
					9e5e5e35a0 | ||
| 
						 | 
					4d99e5b2e7 | ||
| 
						 | 
					f6df34ecbe | ||
| 
						 | 
					d491f7bc14 | ||
| 
						 | 
					1fb583c50d | ||
| 
						 | 
					6738d2ac78 | ||
| 
						 | 
					293b786cee | ||
| 
						 | 
					af197f5f8f | ||
| 
						 | 
					aba535e765 | ||
| 
						 | 
					76f8274daf | ||
| 
						 | 
					1b25898946 | ||
| 
						 | 
					24ae7c4c1f | ||
| 
						 | 
					e4276667da | ||
| 
						 | 
					65c6ca9179 | ||
| 
						 | 
					03d6c4c2db | ||
| 
						 | 
					2db44ffe9d | ||
| 
						 | 
					e9ba8e9214 | ||
| 
						 | 
					cd1cefae91 | ||
| 
						 | 
					cc22179cd8 | ||
| 
						 | 
					1178ed817f | ||
| 
						 | 
					688601911c | ||
| 
						 | 
					ae47121fa3 | ||
| 
						 | 
					1676268eab | ||
| 
						 | 
					baace9ffca | ||
| 
						 | 
					5ed63e0895 | ||
| 
						 | 
					d3778fc129 | ||
| 
						 | 
					a2162e4228 | ||
| 
						 | 
					57b46ee6ea | ||
| 
						 | 
					e67d632d99 | ||
| 
						 | 
					5891a5dd55 | ||
| 
						 | 
					0ce9f39d23 | ||
| 
						 | 
					5fd13173a1 | ||
| 
						 | 
					fabc30cfdd | ||
| 
						 | 
					36822c50ad | ||
| 
						 | 
					4a497e649b | ||
| 
						 | 
					a5455bb374 | ||
| 
						 | 
					6f365c21d7 | ||
| 
						 | 
					775355a88a | ||
| 
						 | 
					0fab0702b0 | ||
| 
						 | 
					470a7b4874 | ||
| 
						 | 
					a1164746e7 | ||
| 
						 | 
					ae14499101 | ||
| 
						 | 
					e4f84b4936 | ||
| 
						 | 
					b20cea3902 | ||
| 
						 | 
					51b36396ae | ||
| 
						 | 
					abd5134965 | ||
| 
						 | 
					bd58a63fe8 | ||
| 
						 | 
					2c2a956a3a | ||
| 
						 | 
					4b7d6f216b | ||
| 
						 | 
					a7de8b6776 | ||
| 
						 | 
					8a039ffe0a | ||
| 
						 | 
					741c2e6434 | ||
| 
						 | 
					4097590bc6 | ||
| 
						 | 
					21f80baa35 | ||
| 
						 | 
					e715c4a62d | ||
| 
						 | 
					987caacbeb | ||
| 
						 | 
					b5d3f2c521 | ||
| 
						 | 
					529e48bb0f | ||
| 
						 | 
					47a3c67fa6 | ||
| 
						 | 
					71f2c401c5 | ||
| 
						 | 
					84cac8441f | ||
| 
						 | 
					e4a01fd7e1 | ||
| 
						 | 
					655ba5d992 | ||
| 
						 | 
					ffa10b1c3b | ||
| 
						 | 
					645c1cef13 | ||
| 
						 | 
					736fcbec47 | ||
| 
						 | 
					5ff1c613ea | ||
| 
						 | 
					b0bb4f6226 | ||
| 
						 | 
					b95884c53d | ||
| 
						 | 
					2a3cc7d907 | ||
| 
						 | 
					c98da4d99a | ||
| 
						 | 
					12c1bee87f | ||
| 
						 | 
					e203c9cdd8 | ||
| 
						 | 
					7cf50e137d | ||
| 
						 | 
					bcebfe647f | ||
| 
						 | 
					9228e17bb5 | ||
| 
						 | 
					55ed11bac5 | ||
| 
						 | 
					874ae72495 | ||
| 
						 | 
					f6e0e92beb | ||
| 
						 | 
					6f0ab1d868 | ||
| 
						 | 
					e34d63f087 | ||
| 
						 | 
					04a6c35819 | ||
| 
						 | 
					7943b349d6 | ||
| 
						 | 
					8bd0693101 | ||
| 
						 | 
					6b1e4ea5a5 | ||
| 
						 | 
					300e1056f5 | ||
| 
						 | 
					3893e638e6 | ||
| 
						 | 
					e7e38a47a8 | ||
| 
						 | 
					e9482d004f | ||
| 
						 | 
					d577248b89 | ||
| 
						 | 
					ca78774fc7 | ||
| 
						 | 
					569b5f32b9 | ||
| 
						 | 
					758a21f104 | ||
| 
						 | 
					1341f40dfe | ||
| 
						 | 
					5439ab0683 | ||
| 
						 | 
					89dae684aa | ||
| 
						 | 
					47cf442c11 | ||
| 
						 | 
					441a4af435 | ||
| 
						 | 
					dbd0dad580 | ||
| 
						 | 
					c47a5327d3 | ||
| 
						 | 
					5071b0812f | ||
| 
						 | 
					a51f07d5a1 | ||
| 
						 | 
					9e48553ccc | ||
| 
						 | 
					80532da3bf | ||
| 
						 | 
					d57bcbed46 | ||
| 
						 | 
					0ab16e0134 | ||
| 
						 | 
					649971518c | ||
| 
						 | 
					f89035b8c4 | ||
| 
						 | 
					9bf68ad963 | ||
| 
						 | 
					9cf779e7ac | ||
| 
						 | 
					b8d091d350 | ||
| 
						 | 
					53e4ebd4e3 | ||
| 
						 | 
					d29e9dfe93 | ||
| 
						 | 
					c6083e1dc4 | ||
| 
						 | 
					b8f9980999 | ||
| 
						 | 
					5759f53934 | ||
| 
						 | 
					6d1055c967 | ||
| 
						 | 
					1a3e034b12 | ||
| 
						 | 
					a5cc6155d4 | ||
| 
						 | 
					dbed202744 | ||
| 
						 | 
					bd3d9b9d04 | ||
| 
						 | 
					8b6a91a93f | ||
| 
						 | 
					e296d7f0e4 | ||
| 
						 | 
					ad51be1ad4 | ||
| 
						 | 
					72deb502d7 | ||
| 
						 | 
					bc69de5f21 | ||
| 
						 | 
					7954a0cafd | ||
| 
						 | 
					f2bcadec7c | ||
| 
						 | 
					f50bbbf855 | ||
| 
						 | 
					8acb7e9ea2 | ||
| 
						 | 
					20dc7e6945 | ||
| 
						 | 
					b9f2494bfc | ||
| 
						 | 
					91979127ec | ||
| 
						 | 
					7884aa151f | ||
| 
						 | 
					a41edc31ce | ||
| 
						 | 
					61cb081a35 | ||
| 
						 | 
					78023e9808 | ||
| 
						 | 
					7b9ff48d02 | ||
| 
						 | 
					f2bfc66c5d | ||
| 
						 | 
					cd487af90b | ||
| 
						 | 
					5f2230c7bf | ||
| 
						 | 
					bcf749e83a | ||
| 
						 | 
					335634b807 | ||
| 
						 | 
					e809379caf | ||
| 
						 | 
					0a716cdff8 | ||
| 
						 | 
					0ff31445f2 | ||
| 
						 | 
					bc920f08f5 | ||
| 
						 | 
					dae62174c5 | ||
| 
						 | 
					c5e907e501 | ||
| 
						 | 
					95d0fe9c11 | ||
| 
						 | 
					c329f0824c | ||
| 
						 | 
					43caa5c09a | ||
| 
						 | 
					a2519c8aed | ||
| 
						 | 
					1b3528fe63 | ||
| 
						 | 
					652a14a215 | ||
| 
						 | 
					a03463303d | ||
| 
						 | 
					9e351d52ae | ||
| 
						 | 
					5028216c81 | ||
| 
						 | 
					531ac77263 | ||
| 
						 | 
					fe5cb830b1 | ||
| 
						 | 
					104c9fde4e | ||
| 
						 | 
					70bb907286 | ||
| 
						 | 
					adcc2ce92b | ||
| 
						 | 
					7448e33768 | ||
| 
						 | 
					5b976943ee | ||
| 
						 | 
					f4a003c3ca | ||
| 
						 | 
					0e14d6d68e | ||
| 
						 | 
					16837e4219 | ||
| 
						 | 
					ac4a41d198 | ||
| 
						 | 
					3d49061bfc | ||
| 
						 | 
					d92f615fe5 | ||
| 
						 | 
					1018a16f39 | ||
| 
						 | 
					f358988f2e | ||
| 
						 | 
					04a374bd05 | ||
| 
						 | 
					51c0c71811 | ||
| 
						 | 
					27b0758a94 | ||
| 
						 | 
					1832f1cc86 | ||
| 
						 | 
					75978bd85e | ||
| 
						 | 
					4dbd625eaf | ||
| 
						 | 
					785c3469f4 | ||
| 
						 | 
					f20ea88f88 | ||
| 
						 | 
					11785d441d | ||
| 
						 | 
					908be619fd | ||
| 
						 | 
					8bce6a217a | ||
| 
						 | 
					5a2f32b102 | ||
| 
						 | 
					830bf65275 | ||
| 
						 | 
					73ccfa0e9a | ||
| 
						 | 
					3bfd0e6f9f | ||
| 
						 | 
					31acab88f2 | ||
| 
						 | 
					08b3ff10d3 | ||
| 
						 | 
					df4fd765d5 | ||
| 
						 | 
					8753bd8900 | ||
| 
						 | 
					691f58930b | ||
| 
						 | 
					29acfe5bd4 | ||
| 
						 | 
					ad608fe44d | ||
| 
						 | 
					cb6ae7b16b | ||
| 
						 | 
					b570a180da | ||
| 
						 | 
					0a31a67269 | ||
| 
						 | 
					1c85aa3332 | ||
| 
						 | 
					3518a7950f | ||
| 
						 | 
					e3a7cc1f9e | ||
| 
						 | 
					5ff4075a69 | ||
| 
						 | 
					4c00e30ef0 | ||
| 
						 | 
					54207dfde6 | ||
| 
						 | 
					18acf6e6f1 | ||
| 
						 | 
					3004bf8fd7 | ||
| 
						 | 
					2b7c042525 | ||
| 
						 | 
					72fc93302c | ||
| 
						 | 
					bcfe3936a8 | ||
| 
						 | 
					15eddf38fb | ||
| 
						 | 
					a6c6fce7e8 | ||
| 
						 | 
					0d47d26a68 | ||
| 
						 | 
					62c24f315b | ||
| 
						 | 
					a2ade36eb1 | ||
| 
						 | 
					bf478280eb | ||
| 
						 | 
					77ff5e038a | ||
| 
						 | 
					608889d18f | ||
| 
						 | 
					93de8d3d86 | ||
| 
						 | 
					6ac852d45b | ||
| 
						 | 
					33143303fe | ||
| 
						 | 
					148bd34079 | ||
| 
						 | 
					8a09c3a34b | ||
| 
						 | 
					c818d6cce5 | ||
| 
						 | 
					30c75badd1 | ||
| 
						 | 
					d3abe14a3a | ||
| 
						 | 
					2aacac9a5d | ||
| 
						 | 
					01429fa46a | ||
| 
						 | 
					36f3712e85 | ||
| 
						 | 
					7d58f44f73 | ||
| 
						 | 
					bb0830da9e | ||
| 
						 | 
					bb95cf8934 | ||
| 
						 | 
					bc80faa7d9 | ||
| 
						 | 
					a9e2abdcfb | ||
| 
						 | 
					2e1ed6447a | ||
| 
						 | 
					9d205e3542 | ||
| 
						 | 
					373aea11c8 | ||
| 
						 | 
					67f7554232 | ||
| 
						 | 
					347b3f0daf | ||
| 
						 | 
					e116d3b3e5 | ||
| 
						 | 
					7b0b2ec73a | ||
| 
						 | 
					5e23af22f7 | ||
| 
						 | 
					afc5699b08 | ||
| 
						 | 
					ed39a43b8c | ||
| 
						 | 
					2780ed4b97 | ||
| 
						 | 
					3d5815f463 | ||
| 
						 | 
					ee403ff0ba | ||
| 
						 | 
					1b2fef5c28 | ||
| 
						 | 
					8e48a232fe | ||
| 
						 | 
					c41edfb7c4 | ||
| 
						 | 
					3d9168025c | ||
| 
						 | 
					f1f288182e | ||
| 
						 | 
					16a8e986ce | ||
| 
						 | 
					d082417dae | ||
| 
						 | 
					5bfaa2f12e | ||
| 
						 | 
					38e3675d7d | ||
| 
						 | 
					0a59ca6cae | ||
| 
						 | 
					38f28665bf | ||
| 
						 | 
					53933fe9db | ||
| 
						 | 
					29cded2654 | ||
| 
						 | 
					c7aeb8bf1f | ||
| 
						 | 
					46560b94ae | ||
| 
						 | 
					3c257e187b | ||
| 
						 | 
					fb8af6fc97 | ||
| 
						 | 
					81e3955acf | ||
| 
						 | 
					197c526d63 | ||
| 
						 | 
					19d1e43261 | ||
| 
						 | 
					a767bff929 | ||
| 
						 | 
					5479e93031 | ||
| 
						 | 
					8afa9e593b | ||
| 
						 | 
					0a355dc010 | ||
| 
						 | 
					25a5dc2ea7 | ||
| 
						 | 
					06ed3f0a0a | ||
| 
						 | 
					6dbb39025c | ||
| 
						 | 
					5535aca5df | ||
| 
						 | 
					0bc933a460 | ||
| 
						 | 
					2bb04cad14 | ||
| 
						 | 
					425fea1c34 | ||
| 
						 | 
					577f318e0e | ||
| 
						 | 
					63fae71713 | ||
| 
						 | 
					355da23785 | ||
| 
						 | 
					39557c3921 | ||
| 
						 | 
					6d62d7f321 | ||
| 
						 | 
					4672b2d88c | ||
| 
						 | 
					b3678f1080 | ||
| 
						 | 
					8b7dfa8526 | ||
| 
						 | 
					7387394e59 | ||
| 
						 | 
					19bf744556 | ||
| 
						 | 
					3427e3547e | ||
| 
						 | 
					df1e73af7a | ||
| 
						 | 
					ea1bfcc80a | ||
| 
						 | 
					2f177e2906 | ||
| 
						 | 
					7acad72a1a | ||
| 
						 | 
					8806915c3a | ||
| 
						 | 
					a13df148df | ||
| 
						 | 
					1a59875367 | ||
| 
						 | 
					e9313a64c1 | ||
| 
						 | 
					d2733fa196 | ||
| 
						 | 
					8ac1f97e9e | ||
| 
						 | 
					6f3178a3be | ||
| 
						 | 
					1639518b64 | ||
| 
						 | 
					935d5e5daa | ||
| 
						 | 
					0299ad7532 | ||
| 
						 | 
					c8cfbf7c19 | ||
| 
						 | 
					2743def830 | ||
| 
						 | 
					fa6be6e77a | ||
| 
						 | 
					f5328c534d | ||
| 
						 | 
					16cdc6ab12 | ||
| 
						 | 
					56671022f9 | ||
| 
						 | 
					b5f0de18b9 | ||
| 
						 | 
					23f48064b8 | ||
| 
						 | 
					815ad714b4 | ||
| 
						 | 
					f3e3178751 | ||
| 
						 | 
					68af9a0773 | ||
| 
						 | 
					4e856077b7 | ||
| 
						 | 
					6507d9249d | ||
| 
						 | 
					e18599a6c3 | ||
| 
						 | 
					92eac1c765 | ||
| 
						 | 
					b048d8e084 | ||
| 
						 | 
					7098924599 | ||
| 
						 | 
					d9bf6ccce9 | ||
| 
						 | 
					371ef9c058 | ||
| 
						 | 
					ad7ce73609 | ||
| 
						 | 
					264c6fd177 | ||
| 
						 | 
					3fa4bd008c | ||
| 
						 | 
					7ea33579e7 | ||
| 
						 | 
					6b406bf09d | ||
| 
						 | 
					2f9757f344 | ||
| 
						 | 
					2c3d34c905 | ||
| 
						 | 
					6e550baa0a | ||
| 
						 | 
					bcc513ebf5 | ||
| 
						 | 
					47489c0721 | ||
| 
						 | 
					c6e2d29cde | ||
| 
						 | 
					eb11fa73ec | ||
| 
						 | 
					47cbbcc1b6 | ||
| 
						 | 
					1bb327ebdb | ||
| 
						 | 
					84c8964116 | ||
| 
						 | 
					77cc447b96 | ||
| 
						 | 
					24fab8e250 | ||
| 
						 | 
					b082abc28f | ||
| 
						 | 
					c6742cedee | ||
| 
						 | 
					3709db0e17 | ||
| 
						 | 
					3df1e04b10 | ||
| 
						 | 
					2a938d3ab7 | ||
| 
						 | 
					79b2d13ae2 | ||
| 
						 | 
					d4eb665c60 | ||
| 
						 | 
					467037de22 | ||
| 
						 | 
					22144ab755 | ||
| 
						 | 
					57ffddba98 | ||
| 
						 | 
					de6a2e0d19 | ||
| 
						 | 
					d8aa0269cd | ||
| 
						 | 
					b1b4036656 | ||
| 
						 | 
					53e4bf9afd | ||
| 
						 | 
					ca8c6a0337 | ||
| 
						 | 
					95e02a210e | ||
| 
						 | 
					896e8bd2d7 | ||
| 
						 | 
					417ed16a88 | ||
| 
						 | 
					a28fa45ab7 | ||
| 
						 | 
					01915e90e6 | ||
| 
						 | 
					eac57f009e | ||
| 
						 | 
					9cb9401e87 | ||
| 
						 | 
					4da75f6d91 | ||
| 
						 | 
					b51b0a847d | ||
| 
						 | 
					249aebdd35 | ||
| 
						 | 
					90ea526114 | ||
| 
						 | 
					be3d539dac | ||
| 
						 | 
					ac859a4cbd | ||
| 
						 | 
					75280a2c74 | ||
| 
						 | 
					89700a4abd | ||
| 
						 | 
					0ceb82b838 | ||
| 
						 | 
					3db5374e66 | ||
| 
						 | 
					d395251b35 | ||
| 
						 | 
					d49081302a | ||
| 
						 | 
					3c646597cf | ||
| 
						 | 
					a11c0bcf97 | ||
| 
						 | 
					865322f931 | ||
| 
						 | 
					d62269757b | ||
| 
						 | 
					188f2949ea | ||
| 
						 | 
					0883634178 | ||
| 
						 | 
					19bbfc6263 | ||
| 
						 | 
					85312e6db1 | ||
| 
						 | 
					eb2b63877a | ||
| 
						 | 
					6a2d72ecff | ||
| 
						 | 
					6da33b1249 | ||
| 
						 | 
					0fe593a71e | ||
| 
						 | 
					d89c87ac40 | ||
| 
						 | 
					b4203c1c49 | ||
| 
						 | 
					0221e4d6c8 | ||
| 
						 | 
					feb555af03 | ||
| 
						 | 
					be3602da41 | ||
| 
						 | 
					6a9851d72d | ||
| 
						 | 
					bf8b5f99a1 | ||
| 
						 | 
					2eb801cda2 | ||
| 
						 | 
					8753b1c397 | ||
| 
						 | 
					bed4c5bf58 | ||
| 
						 | 
					18c516655f | ||
| 
						 | 
					01a5dd879b | ||
| 
						 | 
					6975540db2 | ||
| 
						 | 
					806e20f463 | ||
| 
						 | 
					511378b05d | ||
| 
						 | 
					eb198d2702 | ||
| 
						 | 
					1f57563b9d | ||
| 
						 | 
					30038ecaa2 | ||
| 
						 | 
					feca368c29 | ||
| 
						 | 
					0d04827f6d | ||
| 
						 | 
					74b775e14d | ||
| 
						 | 
					dab76b4dc5 | ||
| 
						 | 
					ea83bacf9c | ||
| 
						 | 
					69c283e061 | ||
| 
						 | 
					abe094e4a1 | ||
| 
						 | 
					4eebc90a17 | ||
| 
						 | 
					8bbc71f2eb | ||
| 
						 | 
					0a0595f2d3 | ||
| 
						 | 
					03ca5eb58f | ||
| 
						 | 
					d6c3f73fb4 | ||
| 
						 | 
					1399d7650d | ||
| 
						 | 
					c499ce31ba | ||
| 
						 | 
					0c75c4c417 | ||
| 
						 | 
					2aadbf41df | ||
| 
						 | 
					aaf5a9bb08 | ||
| 
						 | 
					e75d2424e5 | ||
| 
						 | 
					8f9a594ac8 | ||
| 
						 | 
					f7e1dfeaef | ||
| 
						 | 
					23e8d46e07 | ||
| 
						 | 
					8a42f6b359 | ||
| 
						 | 
					4539e9195d | ||
| 
						 | 
					46b0988c67 | ||
| 
						 | 
					2448fc7dee | ||
| 
						 | 
					86ca15ece7 | ||
| 
						 | 
					c6b2a92613 | ||
| 
						 | 
					4e52e192b2 | ||
| 
						 | 
					4de3ded28a | ||
| 
						 | 
					4e492363f0 | ||
| 
						 | 
					b5fb4fd55b | ||
| 
						 | 
					88c5ceb650 | ||
| 
						 | 
					c3a4dbfbd6 | ||
| 
						 | 
					45323646bd | ||
| 
						 | 
					10686f42c9 | ||
| 
						 | 
					dc866313af | ||
| 
						 | 
					8f28f4850b | ||
| 
						 | 
					479fa1db1d | ||
| 
						 | 
					a81b3532f7 | ||
| 
						 | 
					3c84ab90f2 | ||
| 
						 | 
					15bf1cd129 | ||
| 
						 | 
					ccc8b9239c | ||
| 
						 | 
					18ce0f1254 | ||
| 
						 | 
					9db3f95ace | ||
| 
						 | 
					1f12a07380 | ||
| 
						 | 
					1ceda0f84f | ||
| 
						 | 
					9a0b12ab00 | ||
| 
						 | 
					b4736f5e17 | ||
| 
						 | 
					5c55aa4e61 | ||
| 
						 | 
					a1f1586bcb | ||
| 
						 | 
					b8e1c70ec1 | ||
| 
						 | 
					fb1565bcdd | ||
| 
						 | 
					6830123a4c | ||
| 
						 | 
					43bc364af4 | ||
| 
						 | 
					03d967abb5 | ||
| 
						 | 
					6628bc9cff | ||
| 
						 | 
					dde2da64b5 | ||
| 
						 | 
					78ad878b66 | ||
| 
						 | 
					f378ab825c | ||
| 
						 | 
					8e39ad2cd6 | ||
| 
						 | 
					16461f7c53 | ||
| 
						 | 
					d1baa05439 | ||
| 
						 | 
					8fd9f1748d | ||
| 
						 | 
					228748bc49 | ||
| 
						 | 
					d8bc5a9eba | ||
| 
						 | 
					db7a3318aa | ||
| 
						 | 
					71270195d5 | ||
| 
						 | 
					6e9f8b7cdb | ||
| 
						 | 
					fe69cb4b9b | ||
| 
						 | 
					6d689e8a69 | ||
| 
						 | 
					eeb861df0b | ||
| 
						 | 
					d68b699291 | ||
| 
						 | 
					e56cc3970f | ||
| 
						 | 
					f2515fa83e | ||
| 
						 | 
					426628c374 | ||
| 
						 | 
					326f9ddd8a | ||
| 
						 | 
					ba70e59e82 | ||
| 
						 | 
					961b7cad05 | ||
| 
						 | 
					184a575a00 | ||
| 
						 | 
					407b487017 | ||
| 
						 | 
					d98fdad3bf | ||
| 
						 | 
					5c1e7fa6ee | ||
| 
						 | 
					4b90e68ac6 | ||
| 
						 | 
					e5dfe384ad | ||
| 
						 | 
					d6dd0fceb1 | ||
| 
						 | 
					f3da389ae0 | ||
| 
						 | 
					ab36c9aa1c | ||
| 
						 | 
					9533fd1842 | ||
| 
						 | 
					74b493a5e6 | ||
| 
						 | 
					125fddc31d | ||
| 
						 | 
					6140a8c65f | ||
| 
						 | 
					4e3e9ac8fb | ||
| 
						 | 
					2b2e62154d | ||
| 
						 | 
					b6bcae5698 | ||
| 
						 | 
					ab0c886a6c | ||
| 
						 | 
					f2718b0966 | ||
| 
						 | 
					39927e60ea | ||
| 
						 | 
					c0bcd2ca99 | ||
| 
						 | 
					547bbcabff | ||
| 
						 | 
					d292b83d1a | ||
| 
						 | 
					d43a5943d8 | ||
| 
						 | 
					230928ad5f | ||
| 
						 | 
					3fd01320f1 | ||
| 
						 | 
					ab8b047ae5 | ||
| 
						 | 
					8415686ea2 | ||
| 
						 | 
					321f67c472 | ||
| 
						 | 
					a087c7421b | ||
| 
						 | 
					3f9ee180a8 | ||
| 
						 | 
					e448d6cf0c | ||
| 
						 | 
					ce656b6a0a | ||
| 
						 | 
					bfa023921c | ||
| 
						 | 
					d7fc376de8 | ||
| 
						 | 
					7a1f3a37a1 | ||
| 
						 | 
					b980b2eeb6 | ||
| 
						 | 
					44d8de433e | ||
| 
						 | 
					e9bf776711 | ||
| 
						 | 
					78477947de | ||
| 
						 | 
					ba8f6172bd | ||
| 
						 | 
					c851646050 | ||
| 
						 | 
					8cbc573eae | ||
| 
						 | 
					2d7e25c9ff | ||
| 
						 | 
					f4b02d1a26 | ||
| 
						 | 
					58e9917053 | ||
| 
						 | 
					f22c04cdae | ||
| 
						 | 
					6517211e12 | ||
| 
						 | 
					2fd9c8690f | ||
| 
						 | 
					63cca75e63 | ||
| 
						 | 
					1c768645c5 | ||
| 
						 | 
					d14fce03f0 | ||
| 
						 | 
					08dfacd425 | ||
| 
						 | 
					6532db9868 | ||
| 
						 | 
					3b399df638 | ||
| 
						 | 
					c1d89d4391 | ||
| 
						 | 
					a580e1adb7 | ||
| 
						 | 
					3041d05bbc | ||
| 
						 | 
					8446d1bab1 | ||
| 
						 | 
					6f89984fed | ||
| 
						 | 
					ef68e7bf71 | ||
| 
						 | 
					88f3b89a2c | ||
| 
						 | 
					e5d6fb20a5 | ||
| 
						 | 
					123ff6549b | ||
| 
						 | 
					bc28306f4a | ||
| 
						 | 
					4e96ac080a | ||
| 
						 | 
					a884b4b811 | ||
| 
						 | 
					4292e9c06b | ||
| 
						 | 
					20911cb17c | ||
| 
						 | 
					1b686cedf4 | ||
| 
						 | 
					376d022e4a | ||
| 
						 | 
					ae8ec0b30d | ||
| 
						 | 
					93259cdfa1 | ||
| 
						 | 
					719344b23e | ||
| 
						 | 
					770169f230 | ||
| 
						 | 
					9ef50d5826 | ||
| 
						 | 
					cab974cf6c | ||
| 
						 | 
					d1ff1f6798 | ||
| 
						 | 
					05ecec6f49 | ||
| 
						 | 
					9da422c639 | ||
| 
						 | 
					f1d6b38441 | ||
| 
						 | 
					74e2dd38ed | ||
| 
						 | 
					783d7dfcbf | ||
| 
						 | 
					083e466f88 | ||
| 
						 | 
					daabce72db | ||
| 
						 | 
					4536021a62 | ||
| 
						 | 
					a2003c2895 | ||
| 
						 | 
					b0dbd3ed13 | ||
| 
						 | 
					ac522d4756 | ||
| 
						 | 
					813882526d | ||
| 
						 | 
					3cbbef53bc | ||
| 
						 | 
					062bc07bde | ||
| 
						 | 
					75639547e7 | ||
| 
						 | 
					b38ad54c41 | ||
| 
						 | 
					3afb7a0f70 | ||
| 
						 | 
					b04bcd14ee | ||
| 
						 | 
					14586916b9 | ||
| 
						 | 
					90f042ae8d | ||
| 
						 | 
					8aa019d2ef | ||
| 
						 | 
					ab6e78f3a0 | ||
| 
						 | 
					89c9a4cbf2 | ||
| 
						 | 
					2f911cdf17 | ||
| 
						 | 
					67adba15a2 | ||
| 
						 | 
					90f8ebfd8f | ||
| 
						 | 
					2e5819270b | ||
| 
						 | 
					ec15398681 | ||
| 
						 | 
					23b1503d79 | ||
| 
						 | 
					fed386cdc0 | ||
| 
						 | 
					536ede7e00 | ||
| 
						 | 
					1c6701e1e1 | ||
| 
						 | 
					cba2ca94f1 | ||
| 
						 | 
					06d05afdd6 | ||
| 
						 | 
					fb7899bfec | ||
| 
						 | 
					c1b97d91c7 | ||
| 
						 | 
					83886a5a7f | ||
| 
						 | 
					ab9e273c75 | ||
| 
						 | 
					2ac44e2509 | ||
| 
						 | 
					fac5fd258c | ||
| 
						 | 
					7853901372 | ||
| 
						 | 
					28861b192f | ||
| 
						 | 
					7f55eb2b14 | ||
| 
						 | 
					86ca491ade | ||
| 
						 | 
					bfea97321c | ||
| 
						 | 
					45015e4d79 | ||
| 
						 | 
					4304790e3e | ||
| 
						 | 
					6a35de3cc3 | ||
| 
						 | 
					72ef753d5c | ||
| 
						 | 
					297dfa0fbf | ||
| 
						 | 
					a864432fb4 | ||
| 
						 | 
					50478ded80 | ||
| 
						 | 
					33b2dcf0da | ||
| 
						 | 
					68656667b2 | ||
| 
						 | 
					9aff6cfdc3 | ||
| 
						 | 
					65dcc30599 | ||
| 
						 | 
					b014986fdb | ||
| 
						 | 
					ad2ac216fa | ||
| 
						 | 
					00608a79dc | ||
| 
						 | 
					cdfba5d375 | ||
| 
						 | 
					30e5ef86a0 | ||
| 
						 | 
					dbd1e2b599 | ||
| 
						 | 
					22f5dc74c7 | ||
| 
						 | 
					5e3bc0c2a2 | ||
| 
						 | 
					fbe3726050 | ||
| 
						 | 
					e3048be8ba | ||
| 
						 | 
					0c000ec90c | ||
| 
						 | 
					c34cea7de5 | ||
| 
						 | 
					26d729581f | ||
| 
						 | 
					5c0dccc896 | ||
| 
						 | 
					baf3e77ee2 | ||
| 
						 | 
					3c2e1022ed | ||
| 
						 | 
					189476f265 | ||
| 
						 | 
					ce2733b7cc | ||
| 
						 | 
					2ac294e67f | ||
| 
						 | 
					1487b3ea3e | ||
| 
						 | 
					a852378a62 | ||
| 
						 | 
					b12d8e3b0d | ||
| 
						 | 
					54d7a74532 | ||
| 
						 | 
					a13fab59ae | ||
| 
						 | 
					ede37839ae | ||
| 
						 | 
					9b5bb5939b | ||
| 
						 | 
					6b2eab1869 | ||
| 
						 | 
					912d3a04c1 | ||
| 
						 | 
					5a9026c65d | ||
| 
						 | 
					9e83e8c790 | ||
| 
						 | 
					23caf20169 | ||
| 
						 | 
					1795166732 | ||
| 
						 | 
					0a82c75eab | ||
| 
						 | 
					24a32627d9 | ||
| 
						 | 
					30971cd098 | ||
| 
						 | 
					4fae0260a6 | ||
| 
						 | 
					f930330d5f | ||
| 
						 | 
					c19d783e07 | ||
| 
						 | 
					1e1aac034c | ||
| 
						 | 
					6b8ae62d6b | ||
| 
						 | 
					a2c4c98023 | ||
| 
						 | 
					d45fdeae35 | ||
| 
						 | 
					dd11e7664d | ||
| 
						 | 
					7351049dba | ||
| 
						 | 
					e7f55e76db | ||
| 
						 | 
					bc58b7b409 | ||
| 
						 | 
					b5012e1ee1 | ||
| 
						 | 
					df37d5f2db | ||
| 
						 | 
					8a9507442a | ||
| 
						 | 
					78bb78d1c3 | ||
| 
						 | 
					ba41b8afb1 | ||
| 
						 | 
					6c4268204b | ||
| 
						 | 
					db6aa58267 | ||
| 
						 | 
					8e3366fda7 | ||
| 
						 | 
					3d960a0d84 | ||
| 
						 | 
					71be653edc | ||
| 
						 | 
					5605385194 | ||
| 
						 | 
					14425aeca1 | ||
| 
						 | 
					7298e71360 | ||
| 
						 | 
					2d595d7020 | ||
| 
						 | 
					8d915cb6fb | ||
| 
						 | 
					4f3e7cd3cf | ||
| 
						 | 
					8fa6b363db | ||
| 
						 | 
					790ea3dc7f | ||
| 
						 | 
					861ca519ab | ||
| 
						 | 
					b2ad0754b0 | ||
| 
						 | 
					0070d398d1 | ||
| 
						 | 
					7798374e47 | ||
| 
						 | 
					14940c4ffe | ||
| 
						 | 
					1e885f6e6c | ||
| 
						 | 
					ec0585883a | ||
| 
						 | 
					cd03ed4f54 | ||
| 
						 | 
					7c20642b10 | ||
| 
						 | 
					c6f348cbc9 | ||
| 
						 | 
					a190221f70 | ||
| 
						 | 
					8e4fa8c3e6 | ||
| 
						 | 
					44bd53f259 | ||
| 
						 | 
					fcb23bbd6e | ||
| 
						 | 
					75d7425061 | ||
| 
						 | 
					5f5632c424 | ||
| 
						 | 
					861eb8eb16 | ||
| 
						 | 
					563d26b247 | ||
| 
						 | 
					b35ec1ca05 | ||
| 
						 | 
					9f568e512f | ||
| 
						 | 
					acdb6db846 | ||
| 
						 | 
					fda3b1a4b1 | ||
| 
						 | 
					724abeb058 | ||
| 
						 | 
					e3a051e053 | ||
| 
						 | 
					6e0f0f51e0 | ||
| 
						 | 
					039bf534aa | ||
| 
						 | 
					efeddebe81 | ||
| 
						 | 
					365dc68c39 | ||
| 
						 | 
					9499e017b7 | ||
| 
						 | 
					caef4a35d6 | ||
| 
						 | 
					6ad2c5b59a | ||
| 
						 | 
					69676ac379 | ||
| 
						 | 
					a96308c37d | ||
| 
						 | 
					a457549967 | ||
| 
						 | 
					193005393d | ||
| 
						 | 
					ebb248aa5c | ||
| 
						 | 
					699bc7b73d | ||
| 
						 | 
					c893a015d8 | ||
| 
						 | 
					ba643a2094 | ||
| 
						 | 
					a897b335be | ||
| 
						 | 
					1aa958bc9c | ||
| 
						 | 
					1c4b3f4dfb | ||
| 
						 | 
					7dd57a48e1 | ||
| 
						 | 
					a14cbff8e5 | ||
| 
						 | 
					fe5d67d95f | ||
| 
						 | 
					ba58a6665f | ||
| 
						 | 
					b4df56fcd9 | ||
| 
						 | 
					7460cfabbc | ||
| 
						 | 
					66202b75d5 | ||
| 
						 | 
					7ceffd0e0d | ||
| 
						 | 
					27a26bfc4b | ||
| 
						 | 
					21d073d55a | ||
| 
						 | 
					9a4a958a5c | ||
| 
						 | 
					6cdf09749c | ||
| 
						 | 
					0448488e11 | ||
| 
						 | 
					5a501fbd09 | ||
| 
						 | 
					5bb27edac0 | ||
| 
						 | 
					edda9ae9fb | ||
| 
						 | 
					ac018f5494 | ||
| 
						 | 
					fc2427e81b | ||
| 
						 | 
					e188b6e1f1 | ||
| 
						 | 
					eb326f5f01 | ||
| 
						 | 
					d0d7d62120 | ||
| 
						 | 
					d475730357 | ||
| 
						 | 
					a2d2aed64a | ||
| 
						 | 
					9c7ca850fd | ||
| 
						 | 
					a5b66333fb | ||
| 
						 | 
					9f0bb59c53 | ||
| 
						 | 
					cc50ed60b3 | ||
| 
						 | 
					6aafd2491c | ||
| 
						 | 
					ce938b307e | ||
| 
						 | 
					d367216678 | ||
| 
						 | 
					1873b567b2 | ||
| 
						 | 
					1100b4daa3 | ||
| 
						 | 
					35324a6c60 | ||
| 
						 | 
					1791901468 | ||
| 
						 | 
					fdf2033bda | ||
| 
						 | 
					2c7e6334ec | ||
| 
						 | 
					fa849a0e16 | ||
| 
						 | 
					55590ee810 | ||
| 
						 | 
					476609c539 | ||
| 
						 | 
					16eb23a0cb | ||
| 
						 | 
					22f1ca0131 | ||
| 
						 | 
					9c05c0494d | ||
| 
						 | 
					4f66498304 | ||
| 
						 | 
					e92dd16605 | ||
| 
						 | 
					eb6c6439ae | ||
| 
						 | 
					37a6211795 | ||
| 
						 | 
					574c456a5a | ||
| 
						 | 
					f142a0830a | ||
| 
						 | 
					643be95416 | ||
| 
						 | 
					6542324cb0 | ||
| 
						 | 
					b1394fa92a | ||
| 
						 | 
					3b18a36f21 | ||
| 
						 | 
					63c113a31b | ||
| 
						 | 
					423f2b2884 | ||
| 
						 | 
					b9b329d1e5 | ||
| 
						 | 
					5e0bb98abd | ||
| 
						 | 
					5aa1c1cd5f | ||
| 
						 | 
					1c56fdc707 | ||
| 
						 | 
					f3c399ec11 | ||
| 
						 | 
					345a71a9cb | ||
| 
						 | 
					4ed1d0b2c0 | ||
| 
						 | 
					1ff933b452 | ||
| 
						 | 
					98b3dd40f7 | ||
| 
						 | 
					771b975528 | ||
| 
						 | 
					4360bd7c76 | ||
| 
						 | 
					cefc42f1ba | ||
| 
						 | 
					008e4e7e39 | ||
| 
						 | 
					0e52184c48 | ||
| 
						 | 
					f7a4bcaf79 | ||
| 
						 | 
					64a23a0f9c | ||
| 
						 | 
					23316033db | ||
| 
						 | 
					ae18872bc7 | ||
| 
						 | 
					a94ee16534 | ||
| 
						 | 
					881ec9ee67 | ||
| 
						 | 
					8d4bd87c1a | ||
| 
						 | 
					e4b684ce49 | ||
| 
						 | 
					d49b34a233 | ||
| 
						 | 
					b8cc150836 | ||
| 
						 | 
					4df1f7c7ba | ||
| 
						 | 
					82cfcfa63a | ||
| 
						 | 
					b9466fca3e | ||
| 
						 | 
					8f39dd1e62 | ||
| 
						 | 
					038573aae7 | ||
| 
						 | 
					b506d8753d | ||
| 
						 | 
					9a2da667f3 | ||
| 
						 | 
					399ae35ac6 | ||
| 
						 | 
					9d3e5db9fc | ||
| 
						 | 
					7f7b205259 | ||
| 
						 | 
					48c6a6ecd2 | ||
| 
						 | 
					e18e0e98fe | ||
| 
						 | 
					46dbaec56a | ||
| 
						 | 
					2bf5d9470d | ||
| 
						 | 
					8ad306baf6 | ||
| 
						 | 
					c4c639c9a4 | ||
| 
						 | 
					18f73b622f | ||
| 
						 | 
					16c3ea9459 | ||
| 
						 | 
					693f81be4c | ||
| 
						 | 
					38d3f3d660 | ||
| 
						 | 
					724f2939f4 | ||
| 
						 | 
					afa61173a8 | ||
| 
						 | 
					37cfb3b5c2 | ||
| 
						 | 
					f96ce6a707 | ||
| 
						 | 
					c52fc9b49c | ||
| 
						 | 
					9c27278acf | ||
| 
						 | 
					f75d697c03 | ||
| 
						 | 
					45f3634ce3 | ||
| 
						 | 
					3a71d05e53 | ||
| 
						 | 
					dca39e8911 | ||
| 
						 | 
					01e54753ff | ||
| 
						 | 
					bc6f07856f | ||
| 
						 | 
					513d486e75 | ||
| 
						 | 
					a805bb9691 | ||
| 
						 | 
					bfc6ee1b13 | ||
| 
						 | 
					e8a84a93aa | ||
| 
						 | 
					bed573586e | ||
| 
						 | 
					328cb0b512 | ||
| 
						 | 
					b3fdfa1246 | ||
| 
						 | 
					15915b03d0 | ||
| 
						 | 
					5a0d3dc7b3 | ||
| 
						 | 
					b92d64e150 | ||
| 
						 | 
					f93b3dd69e | ||
| 
						 | 
					116970154d | ||
| 
						 | 
					8e053916c8 | ||
| 
						 | 
					289d47eee5 | ||
| 
						 | 
					148fb313c5 | ||
| 
						 | 
					e8e20ae598 | ||
| 
						 | 
					8aee2a3326 | ||
| 
						 | 
					ef9025a641 | ||
| 
						 | 
					5d3a95714c | ||
| 
						 | 
					cf8eebee07 | ||
| 
						 | 
					732dd6f417 | ||
| 
						 | 
					147b08328a | ||
| 
						 | 
					7e70874420 | ||
| 
						 | 
					b5b5c52034 | ||
| 
						 | 
					f4f4dab25a | ||
| 
						 | 
					043654bbfb | ||
| 
						 | 
					9b61162d43 | ||
| 
						 | 
					3f8a70e5dd | ||
| 
						 | 
					a6d46f6b99 | ||
| 
						 | 
					d4b799b60c | ||
| 
						 | 
					46e8a51383 | ||
| 
						 | 
					6339e621f5 | ||
| 
						 | 
					fa4525e289 | ||
| 
						 | 
					b1097f24a8 | ||
| 
						 | 
					e716184cae | ||
| 
						 | 
					6f0294ca47 | ||
| 
						 | 
					e98276c859 | ||
| 
						 | 
					dff7924e25 | ||
| 
						 | 
					094e2f1a67 | ||
| 
						 | 
					7aac6d6b8e | ||
| 
						 | 
					8deec7bf5f | ||
| 
						 | 
					963946d3d7 | ||
| 
						 | 
					d4f6695a3e | ||
| 
						 | 
					042066887b | ||
| 
						 | 
					507d83e4cc | ||
| 
						 | 
					ddf69f247f | ||
| 
						 | 
					585d191ae7 | ||
| 
						 | 
					bd0f7f42d6 | ||
| 
						 | 
					6f173cafbd | ||
| 
						 | 
					b8d907a9bb | ||
| 
						 | 
					ee2ef90b7f | ||
| 
						 | 
					769439a23d | ||
| 
						 | 
					00277e836d | ||
| 
						 | 
					6d04725282 | ||
| 
						 | 
					390488d12e | ||
| 
						 | 
					85dc4e7a77 | ||
| 
						 | 
					974e468e6d | ||
| 
						 | 
					6998c71458 | ||
| 
						 | 
					5c8de84f5f | ||
| 
						 | 
					1357249aa9 | ||
| 
						 | 
					5d5b09cf79 | ||
| 
						 | 
					14adbf467d | ||
| 
						 | 
					ebc22c032a | ||
| 
						 | 
					d9772291ee | ||
| 
						 | 
					8b4738ca47 | ||
| 
						 | 
					f7d503376f | ||
| 
						 | 
					c7d1444f9c | ||
| 
						 | 
					cc70e78d65 | ||
| 
						 | 
					cf89b89be8 | ||
| 
						 | 
					206bd46e2b | ||
| 
						 | 
					26f3b05fe5 | ||
| 
						 | 
					d283df605e | ||
| 
						 | 
					912ed380fe | ||
| 
						 | 
					a0faa7f0ec | ||
| 
						 | 
					33e13e78e9 | ||
| 
						 | 
					936d240718 | ||
| 
						 | 
					1e8b5f539e | ||
| 
						 | 
					fb0c3fccc0 | ||
| 
						 | 
					a62875d20e | ||
| 
						 | 
					d126c7f8d8 | ||
| 
						 | 
					6fae9eb4b4 | ||
| 
						 | 
					3284b5ddba | ||
| 
						 | 
					f19cba049d | ||
| 
						 | 
					f8246e2fda | ||
| 
						 | 
					7eb0603574 | ||
| 
						 | 
					4bb651306c | ||
| 
						 | 
					cc8e37ffb3 | ||
| 
						 | 
					96943544ba | ||
| 
						 | 
					fb88eeee9f | ||
| 
						 | 
					c4266ac71e | ||
| 
						 | 
					f88602394d | ||
| 
						 | 
					f545e2aedd | ||
| 
						 | 
					bdce2d3a19 | ||
| 
						 | 
					a6ec029247 | ||
| 
						 | 
					ad2ef3347f | ||
| 
						 | 
					56c760668a | ||
| 
						 | 
					baf8bbe918 | ||
| 
						 | 
					9fbedc8773 | ||
| 
						 | 
					1de8f11705 | ||
| 
						 | 
					a9c909df5b | ||
| 
						 | 
					dd0b2b7f71 | ||
| 
						 | 
					7c7de76f82 | ||
| 
						 | 
					a38e117fe6 | ||
| 
						 | 
					6479a175e4 | ||
| 
						 | 
					08b082ae1a | ||
| 
						 | 
					ae01d0837d | ||
| 
						 | 
					595fce04f6 | ||
| 
						 | 
					6c50e16b3d | ||
| 
						 | 
					c29714dccb | ||
| 
						 | 
					20df8f5f92 | ||
| 
						 | 
					fd9f740045 | ||
| 
						 | 
					86586aa6f9 | ||
| 
						 | 
					0dc5edf3ae | ||
| 
						 | 
					f174cda80c | ||
| 
						 | 
					c535ba5a10 | ||
| 
						 | 
					ae41a955fb | ||
| 
						 | 
					36b303f15d | ||
| 
						 | 
					73b5e3766f | ||
| 
						 | 
					c079d690da | ||
| 
						 | 
					3c6ffb53f7 | ||
| 
						 | 
					77d61af876 | ||
| 
						 | 
					904ecb2355 | ||
| 
						 | 
					2d8db39301 | ||
| 
						 | 
					24507ff6ab | ||
| 
						 | 
					92009554ce | ||
| 
						 | 
					dbd52e50ff | ||
| 
						 | 
					08df6e0a83 | ||
| 
						 | 
					f7688171c4 | ||
| 
						 | 
					d88f8e9cac | ||
| 
						 | 
					02e8a03593 | ||
| 
						 | 
					9e7f9b3e99 | ||
| 
						 | 
					0674c22e01 | ||
| 
						 | 
					5b0a7f3971 | ||
| 
						 | 
					e4b40b0211 | ||
| 
						 | 
					f13a330e44 | ||
| 
						 | 
					2a1f50aee4 | ||
| 
						 | 
					498c09040e | ||
| 
						 | 
					6a06707f59 | ||
| 
						 | 
					37283bb248 | ||
| 
						 | 
					86a2de4f1f | ||
| 
						 | 
					308a7152b2 | ||
| 
						 | 
					5f1eb35ee2 | ||
| 
						 | 
					a25f7e1d90 | ||
| 
						 | 
					fd3df4b0f7 | ||
| 
						 | 
					de82d063d4 | ||
| 
						 | 
					daf3778e86 | ||
| 
						 | 
					39103d2e20 | ||
| 
						 | 
					401fc936f1 | ||
| 
						 | 
					dd18a4f335 | ||
| 
						 | 
					4ec13a48b1 | ||
| 
						 | 
					3c8299c779 | ||
| 
						 | 
					2af2c2b556 | ||
| 
						 | 
					e4b65b6e59 | ||
| 
						 | 
					b92471b74c | ||
| 
						 | 
					7dac13272a | ||
| 
						 | 
					4cc11a4fb3 | ||
| 
						 | 
					9f60fd2154 | ||
| 
						 | 
					479fab6a34 | ||
| 
						 | 
					55336ae09d | ||
| 
						 | 
					a179cbf0dd | ||
| 
						 | 
					5b2a619fb2 | ||
| 
						 | 
					c3501b01d1 | ||
| 
						 | 
					9b08f27000 | ||
| 
						 | 
					0852d0b95e | ||
| 
						 | 
					d27e256f49 | ||
| 
						 | 
					e7268d8341 | ||
| 
						 | 
					63ec423823 | ||
| 
						 | 
					9fb1279b71 | ||
| 
						 | 
					b3a58bbf1d | ||
| 
						 | 
					614ff87923 | ||
| 
						 | 
					1f0e213bf8 | ||
| 
						 | 
					ffd561e4b5 | ||
| 
						 | 
					7b2c0f9148 | ||
| 
						 | 
					4c07bd5709 | ||
| 
						 | 
					07b220ad46 | ||
| 
						 | 
					77ee5aad27 | ||
| 
						 | 
					0c03647f08 | ||
| 
						 | 
					9540a1dbcf | ||
| 
						 | 
					c470d86633 | ||
| 
						 | 
					97529e8e1a | ||
| 
						 | 
					aa19f80f40 | ||
| 
						 | 
					c45e83e787 | ||
| 
						 | 
					bf996dace4 | ||
| 
						 | 
					7d84f5dc5b | ||
| 
						 | 
					ad68f17a06 | ||
| 
						 | 
					aea03c424d | ||
| 
						 | 
					d04d20974e | ||
| 
						 | 
					ad817704fa | ||
| 
						 | 
					eed6f69199 | ||
| 
						 | 
					1e0163272b | ||
| 
						 | 
					16541de30e | ||
| 
						 | 
					413d6a21f8 | ||
| 
						 | 
					2c3a620133 | ||
| 
						 | 
					5fb84d263b | ||
| 
						 | 
					f658ab0e2e | ||
| 
						 | 
					aea66b135e | ||
| 
						 | 
					98b88b3e70 | ||
| 
						 | 
					478beace47 | ||
| 
						 | 
					f59afc9aad | ||
| 
						 | 
					4d5984444e | ||
| 
						 | 
					90fbef490e | ||
| 
						 | 
					1207bf057a | ||
| 
						 | 
					35d5301a54 | ||
| 
						 | 
					fc4b44399a | ||
| 
						 | 
					df54463363 | ||
| 
						 | 
					8da58f3184 | ||
| 
						 | 
					f2fc19d785 | ||
| 
						 | 
					86fc370d39 | ||
| 
						 | 
					87a7897d38 | ||
| 
						 | 
					4951c0e0a8 | ||
| 
						 | 
					57a055c82f | ||
| 
						 | 
					af7ad8dded | ||
| 
						 | 
					0890ed3148 | ||
| 
						 | 
					08f0374bfa | ||
| 
						 | 
					dec7e16cc0 | ||
| 
						 | 
					fbbac25ad3 | ||
| 
						 | 
					cc2b08ddf0 | ||
| 
						 | 
					b1bc367ab3 | ||
| 
						 | 
					58f71ace50 | ||
| 
						 | 
					2765e6848a | ||
| 
						 | 
					43ddff4549 | ||
| 
						 | 
					e160138d13 | ||
| 
						 | 
					f77064e9e2 | ||
| 
						 | 
					70a9328de3 | ||
| 
						 | 
					65300223fb | ||
| 
						 | 
					4420246955 | ||
| 
						 | 
					21301cdc06 | ||
| 
						 | 
					3a94f5c0ac | ||
| 
						 | 
					0c74657fe0 | ||
| 
						 | 
					0914fbaec1 | ||
| 
						 | 
					e2f66e40df | ||
| 
						 | 
					5a8a6d9ac5 | ||
| 
						 | 
					ecfdd8814e | ||
| 
						 | 
					3ee628f83a | ||
| 
						 | 
					da99cded26 | ||
| 
						 | 
					7a39d2f833 | ||
| 
						 | 
					102860a459 | ||
| 
						 | 
					0fc001210d | ||
| 
						 | 
					e691ee2753 | ||
| 
						 | 
					0665d482d2 | ||
| 
						 | 
					6698b2294f | ||
| 
						 | 
					82b02f0ef2 | ||
| 
						 | 
					9cff558064 | ||
| 
						 | 
					293cee7669 | ||
| 
						 | 
					cf576500dc | ||
| 
						 | 
					1afd946ce8 | ||
| 
						 | 
					cafc3b35c7 | ||
| 
						 | 
					9635376e44 | ||
| 
						 | 
					9f0289dfac | ||
| 
						 | 
					a14d28c2bd | ||
| 
						 | 
					474e2f4dbb | ||
| 
						 | 
					d78acfa365 | ||
| 
						 | 
					065607e884 | ||
| 
						 | 
					0b5566a9d6 | ||
| 
						 | 
					e70c623cf0 | ||
| 
						 | 
					ad08108616 | ||
| 
						 | 
					1a1cf7ed75 | ||
| 
						 | 
					f882577812 | ||
| 
						 | 
					b0ef7454f4 | ||
| 
						 | 
					07ec12f745 | ||
| 
						 | 
					f3b3ab924f | ||
| 
						 | 
					ede979fcb5 | ||
| 
						 | 
					8c7889d99f | ||
| 
						 | 
					34fb5db643 | ||
| 
						 | 
					df81387dfa | ||
| 
						 | 
					178a1c5a25 | ||
| 
						 | 
					9ad2ce070e | ||
| 
						 | 
					96461a25c3 | ||
| 
						 | 
					ca4a891bb3 | ||
| 
						 | 
					0f32948dab | ||
| 
						 | 
					71dea349d2 | ||
| 
						 | 
					353479fa8a | ||
| 
						 | 
					c397a6b283 | ||
| 
						 | 
					7b5f09c7de | ||
| 
						 | 
					4bdcfe50f8 | ||
| 
						 | 
					0bb0c7cc85 | ||
| 
						 | 
					a5f4cae20a | ||
| 
						 | 
					0c12733fb7 | ||
| 
						 | 
					83aeeb0967 | ||
| 
						 | 
					0501b25d69 | ||
| 
						 | 
					bc95b628fe | ||
| 
						 | 
					825fb31e58 | ||
| 
						 | 
					e9cd76e239 | ||
| 
						 | 
					eae28ca68c | ||
| 
						 | 
					76713fb0b0 | ||
| 
						 | 
					2511ba7c92 | ||
| 
						 | 
					ddf9b3aa48 | ||
| 
						 | 
					ad2f32155f | ||
| 
						 | 
					179870a5b8 | ||
| 
						 | 
					7a6bb1bb82 | ||
| 
						 | 
					13811376c9 | ||
| 
						 | 
					5223c4d33f | ||
| 
						 | 
					716be93686 | ||
| 
						 | 
					67c01f5f67 | ||
| 
						 | 
					ce8e1a4f13 | ||
| 
						 | 
					b5410da76e | ||
| 
						 | 
					d0130a989a | ||
| 
						 | 
					4fe34b27f6 | ||
| 
						 | 
					ff3e00320e | ||
| 
						 | 
					43d8e2123f | ||
| 
						 | 
					5605798e56 | ||
| 
						 | 
					a28a4f7820 | ||
| 
						 | 
					47e719fa44 | ||
| 
						 | 
					a8ede6b076 | ||
| 
						 | 
					8cce314c32 | ||
| 
						 | 
					ada5f1cd06 | ||
| 
						 | 
					39350966ad | ||
| 
						 | 
					250069dbb4 | ||
| 
						 | 
					a518b47e5b | ||
| 
						 | 
					767e2cf251 | ||
| 
						 | 
					853fb984de | ||
| 
						 | 
					d697289746 | ||
| 
						 | 
					5cedb32f6b | ||
| 
						 | 
					b0362de32b | ||
| 
						 | 
					2b2e925ea4 | ||
| 
						 | 
					ede4887b16 | ||
| 
						 | 
					985d6b2987 | ||
| 
						 | 
					4e0445550d | ||
| 
						 | 
					15724afd62 | ||
| 
						 | 
					0771d159d5 | ||
| 
						 | 
					3eae261da9 | ||
| 
						 | 
					3cd7738c9b | ||
| 
						 | 
					32afff3fe3 | ||
| 
						 | 
					c8735e8f82 | ||
| 
						 | 
					d4a736d52c | ||
| 
						 | 
					d708c74ed5 | ||
| 
						 | 
					c69208451e | ||
| 
						 | 
					9d0bc1d633 | ||
| 
						 | 
					8fbd189d81 | ||
| 
						 | 
					db5c274851 | ||
| 
						 | 
					9c4f016d21 | ||
| 
						 | 
					2f8b4c9d2f | ||
| 
						 | 
					ed388938a1 | ||
| 
						 | 
					a74394c3a8 | ||
| 
						 | 
					87a6230d59 | ||
| 
						 | 
					7e67fb41fb | ||
| 
						 | 
					941dcc797e | ||
| 
						 | 
					a9c53fa9ee | ||
| 
						 | 
					98a8662f65 | ||
| 
						 | 
					bb128de744 | ||
| 
						 | 
					16b647d8b2 | ||
| 
						 | 
					199d039bc3 | ||
| 
						 | 
					25673f0cba | ||
| 
						 | 
					962f426915 | ||
| 
						 | 
					aa51bb083b | ||
| 
						 | 
					3da3b9e84c | ||
| 
						 | 
					37d34bc12f | ||
| 
						 | 
					c140020182 | ||
| 
						 | 
					7909019a3e | ||
| 
						 | 
					3bbbfbf202 | ||
| 
						 | 
					4a3ccfee80 | ||
| 
						 | 
					59bcfe3b3b | ||
| 
						 | 
					e1210b1769 | ||
| 
						 | 
					fc68be6b11 | ||
| 
						 | 
					b2e4600183 | ||
| 
						 | 
					b371e0da2b | ||
| 
						 | 
					f2123080b5 | ||
| 
						 | 
					a5724069f1 | ||
| 
						 | 
					bd2055cf7e | ||
| 
						 | 
					d3d72804b0 | ||
| 
						 | 
					047fdf06cc | ||
| 
						 | 
					e5d68a2b7d | ||
| 
						 | 
					aed8a96ef2 | ||
| 
						 | 
					03b7aee438 | ||
| 
						 | 
					5ca0d13823 | ||
| 
						 | 
					1e35590f14 | ||
| 
						 | 
					fffb809777 | ||
| 
						 | 
					57e7108b75 | ||
| 
						 | 
					845bf3c2b1 | ||
| 
						 | 
					4827179cc0 | ||
| 
						 | 
					8fd9fcbc2d | ||
| 
						 | 
					5a564056f5 | ||
| 
						 | 
					070b2644c6 | ||
| 
						 | 
					a14ee6b081 | ||
| 
						 | 
					7d69e9e93f | ||
| 
						 | 
					a1cfd0f7a1 | ||
| 
						 | 
					23ee049401 | ||
| 
						 | 
					9d4d855208 | ||
| 
						 | 
					d7361e1717 | ||
| 
						 | 
					ba3d9d0ce9 | ||
| 
						 | 
					de5c19d139 | ||
| 
						 | 
					021a525616 | ||
| 
						 | 
					d25df35154 | ||
| 
						 | 
					56edca9f62 | ||
| 
						 | 
					9fd2b0a698 | ||
| 
						 | 
					d03dc25477 | ||
| 
						 | 
					7553e3027c | ||
| 
						 | 
					afb8c93470 | ||
| 
						 | 
					4f6d60e9cf | ||
| 
						 | 
					9891bf086d | ||
| 
						 | 
					d6998a714c | ||
| 
						 | 
					45c7e2abe7 | ||
| 
						 | 
					0d24f7b50e | ||
| 
						 | 
					bed91a3fcd | ||
| 
						 | 
					0862721958 | ||
| 
						 | 
					b132e8da5e | ||
| 
						 | 
					f87c5e229f | ||
| 
						 | 
					bd3355bbcd | ||
| 
						 | 
					9dd2747e5f | ||
| 
						 | 
					ca1f44b401 | ||
| 
						 | 
					780c4e057b | ||
| 
						 | 
					3769b3fed4 | ||
| 
						 | 
					49dcae8c80 | ||
| 
						 | 
					d21cdb6d84 | ||
| 
						 | 
					29d39d52a0 | ||
| 
						 | 
					0293878846 | ||
| 
						 | 
					42ad53f67e | ||
| 
						 | 
					9b8094a663 | ||
| 
						 | 
					832179c50e | ||
| 
						 | 
					fd2e6dbbc8 | ||
| 
						 | 
					279d9e3ea7 | ||
| 
						 | 
					b7d076fc96 | ||
| 
						 | 
					43911c8ef0 | ||
| 
						 | 
					ae40595b69 | ||
| 
						 | 
					8a4014c6fb | ||
| 
						 | 
					633e1dcb2b | ||
| 
						 | 
					2090b97998 | ||
| 
						 | 
					77ce6da028 | ||
| 
						 | 
					a937128030 | ||
| 
						 | 
					aa80e29386 | ||
| 
						 | 
					d7c4f043fe | ||
| 
						 | 
					d94aa337bf | ||
| 
						 | 
					1ea2d444fa | ||
| 
						 | 
					66ae25078e | ||
| 
						 | 
					f7b5707d66 | ||
| 
						 | 
					8a90cabf81 | ||
| 
						 | 
					0555a98926 | ||
| 
						 | 
					e7eb459d27 | ||
| 
						 | 
					4ce2d87cf6 | ||
| 
						 | 
					959f802dab | ||
| 
						 | 
					a742e9bccd | ||
| 
						 | 
					7621c4d66b | ||
| 
						 | 
					586b4f66a8 | ||
| 
						 | 
					e7b16b74bf | ||
| 
						 | 
					39c8977802 | ||
| 
						 | 
					650cb74bcb | ||
| 
						 | 
					46f717f949 | ||
| 
						 | 
					27b2e83805 | ||
| 
						 | 
					7c652d7722 | ||
| 
						 | 
					3cb1121299 | ||
| 
						 | 
					ab07ef4093 | ||
| 
						 | 
					9aafc4fd5d | ||
| 
						 | 
					1b2ff69f46 | ||
| 
						 | 
					516b8363bb | ||
| 
						 | 
					fca17350b6 | ||
| 
						 | 
					7a7ca3f345 | ||
| 
						 | 
					56b99de2fa | ||
| 
						 | 
					9360a4450d | ||
| 
						 | 
					64eef48741 | ||
| 
						 | 
					aabf086a03 | ||
| 
						 | 
					4f92969899 | ||
| 
						 | 
					b3f16c4350 | ||
| 
						 | 
					e02ffc1226 | ||
| 
						 | 
					463d15add9 | ||
| 
						 | 
					b50d03e5bc | ||
| 
						 | 
					392a7008d1 | ||
| 
						 | 
					7fc29c5fa7 | ||
| 
						 | 
					3f600e47cf | ||
| 
						 | 
					0223baaf57 | ||
| 
						 | 
					1b6592aae7 | ||
| 
						 | 
					4f980f4ebb | ||
| 
						 | 
					b440dfeee6 | ||
| 
						 | 
					ed30dfa126 | ||
| 
						 | 
					8df3d8ae6c | ||
| 
						 | 
					4ee75bdab5 | ||
| 
						 | 
					c232ecbfdf | ||
| 
						 | 
					54ec0cbfa9 | ||
| 
						 | 
					4c7e3c29f7 | ||
| 
						 | 
					f9b9cd71d6 | ||
| 
						 | 
					9d823a3513 | ||
| 
						 | 
					65d54604c3 | ||
| 
						 | 
					3bc58af79d | ||
| 
						 | 
					15da01e16b | ||
| 
						 | 
					eca1bc983d | ||
| 
						 | 
					6b729d41f0 | ||
| 
						 | 
					058a3ab4cb | ||
| 
						 | 
					aae9db03e4 | ||
| 
						 | 
					26a89579e4 | ||
| 
						 | 
					e5ed37fa4e | ||
| 
						 | 
					3994b77bab | ||
| 
						 | 
					0f21a5d36b | ||
| 
						 | 
					7f88ac198c | ||
| 
						 | 
					4c5fb70380 | ||
| 
						 | 
					4ceb5616e6 | ||
| 
						 | 
					f5d36aefd1 | ||
| 
						 | 
					45cec8167d | ||
| 
						 | 
					9f9de170f2 | ||
| 
						 | 
					f9db0039b1 | ||
| 
						 | 
					c1aa1218ef | ||
| 
						 | 
					9ec28c03c0 | ||
| 
						 | 
					bb7e2e846c | ||
| 
						 | 
					eaba005f18 | ||
| 
						 | 
					f183a0fc01 | ||
| 
						 | 
					b11b0954a2 | ||
| 
						 | 
					e828bc8f61 | ||
| 
						 | 
					8ceb5c34dd | ||
| 
						 | 
					7c2225373e | ||
| 
						 | 
					f1a03a3709 | ||
| 
						 | 
					ead285a926 | ||
| 
						 | 
					8814124f35 | ||
| 
						 | 
					b5d049f15e | ||
| 
						 | 
					87ae69c45d | ||
| 
						 | 
					97c33f3ede | ||
| 
						 | 
					b629b0743c | ||
| 
						 | 
					f3232bcaf1 | ||
| 
						 | 
					7ac435066a | ||
| 
						 | 
					feb06c8d9a | ||
| 
						 | 
					bfa012d985 | ||
| 
						 | 
					ecfa382144 | ||
| 
						 | 
					7d4d54cf94 | ||
| 
						 | 
					50877fb096 | ||
| 
						 | 
					4278ec184d | ||
| 
						 | 
					3b9a5e912f | ||
| 
						 | 
					67333973b6 | ||
| 
						 | 
					cec5f6f00d | ||
| 
						 | 
					a511609501 | ||
| 
						 | 
					feaf04a27b | ||
| 
						 | 
					7c8cfc6977 | ||
| 
						 | 
					02da4625b8 | ||
| 
						 | 
					8b590c0ad3 | ||
| 
						 | 
					34c6d687ca | ||
| 
						 | 
					df6a28d105 | ||
| 
						 | 
					a5f618a291 | ||
| 
						 | 
					0e3342ea29 | ||
| 
						 | 
					5df6816e2c | ||
| 
						 | 
					21ab258821 | ||
| 
						 | 
					b6273023a2 | ||
| 
						 | 
					27b4b2f003 | ||
| 
						 | 
					5bd2987840 | ||
| 
						 | 
					7a0f9dbb94 | ||
| 
						 | 
					27be87cdff | ||
| 
						 | 
					6610c2b084 | ||
| 
						 | 
					2c9bf83b90 | ||
| 
						 | 
					85db3d7563 | ||
| 
						 | 
					3ab6bbe613 | ||
| 
						 | 
					ef5d084d3c | ||
| 
						 | 
					e39ed58116 | ||
| 
						 | 
					59d6da5365 | ||
| 
						 | 
					bd986282f3 | ||
| 
						 | 
					15b40dfe75 | ||
| 
						 | 
					fa937f611a | ||
| 
						 | 
					af763d5e43 | ||
| 
						 | 
					ae773f612c | ||
| 
						 | 
					7527a1844d | ||
| 
						 | 
					8df7c673ec | ||
| 
						 | 
					ab656ba642 | ||
| 
						 | 
					a360ab2a33 | ||
| 
						 | 
					3c27be3738 | ||
| 
						 | 
					a9601f1b4c | ||
| 
						 | 
					577c67e860 | ||
| 
						 | 
					46a5936f54 | ||
| 
						 | 
					80ef05c9d5 | ||
| 
						 | 
					3d41d5ade7 | ||
| 
						 | 
					9f037fdc72 | ||
| 
						 | 
					ee5baf2747 | ||
| 
						 | 
					aff45fde80 | ||
| 
						 | 
					e78dd0243c | ||
| 
						 | 
					668ac873a0 | ||
| 
						 | 
					bab8f790ae | ||
| 
						 | 
					99e89283d6 | ||
| 
						 | 
					73e6952ad7 | ||
| 
						 | 
					397c9dd375 | ||
| 
						 | 
					b79d289bde | ||
| 
						 | 
					d4ce76275d | ||
| 
						 | 
					0b6fec7a6f | ||
| 
						 | 
					df37c6bd65 | ||
| 
						 | 
					e69f1f54f9 | ||
| 
						 | 
					38a683816b | ||
| 
						 | 
					b13fd0bc9e | ||
| 
						 | 
					65cd4d80c4 | ||
| 
						 | 
					539cce5248 | ||
| 
						 | 
					1816ec4500 | ||
| 
						 | 
					cd8e492c55 | ||
| 
						 | 
					ab8de7b678 | ||
| 
						 | 
					5829f0c960 | ||
| 
						 | 
					4bad6744d2 | ||
| 
						 | 
					b34024bc62 | ||
| 
						 | 
					42fcf03e3a | ||
| 
						 | 
					bd409f4143 | ||
| 
						 | 
					8427d93449 | ||
| 
						 | 
					8460cc9bf9 | ||
| 
						 | 
					831f8ada7b | ||
| 
						 | 
					a02fb6afc8 | ||
| 
						 | 
					3face37ca4 | ||
| 
						 | 
					fab9712714 | ||
| 
						 | 
					784d76024c | ||
| 
						 | 
					ea39f042c3 | ||
| 
						 | 
					fa9df40e8a | ||
| 
						 | 
					23903a2338 | ||
| 
						 | 
					d0a3ea051a | ||
| 
						 | 
					f2dce72167 | ||
| 
						 | 
					b086b95fed | ||
| 
						 | 
					b45c71aeff | ||
| 
						 | 
					d2702f0022 | ||
| 
						 | 
					6b8cced81a | ||
| 
						 | 
					f224b12a5b | ||
| 
						 | 
					59668e3eb3 | ||
| 
						 | 
					075398b879 | ||
| 
						 | 
					9560f05def | ||
| 
						 | 
					bc794059d8 | ||
| 
						 | 
					663049a719 | ||
| 
						 | 
					2b1c416e21 | ||
| 
						 | 
					e0a87f9087 | ||
| 
						 | 
					3a6eeddb8a | ||
| 
						 | 
					976dba2965 | ||
| 
						 | 
					8fddcf3343 | ||
| 
						 | 
					4428a3f359 | ||
| 
						 | 
					4df415b190 | ||
| 
						 | 
					a749f75826 | ||
| 
						 | 
					bfd2bd2b3a | ||
| 
						 | 
					f9b97d95f9 | ||
| 
						 | 
					9f94399cf3 | ||
| 
						 | 
					01c071340d | ||
| 
						 | 
					68ee4bc7ca | ||
| 
						 | 
					3228421f69 | ||
| 
						 | 
					8d365ab204 | ||
| 
						 | 
					d73af1122a | ||
| 
						 | 
					062ebf45c5 | ||
| 
						 | 
					215ff22651 | ||
| 
						 | 
					998955f54f | ||
| 
						 | 
					83f1d317c2 | ||
| 
						 | 
					e06c7f32cf | ||
| 
						 | 
					262f9e52d6 | ||
| 
						 | 
					76bc4403fd | ||
| 
						 | 
					e9fa7908d1 | ||
| 
						 | 
					b39e3bad1d | ||
| 
						 | 
					04f1248ef9 | ||
| 
						 | 
					0fed6a1bde | ||
| 
						 | 
					d8aec9b55b | ||
| 
						 | 
					3781b7bfa5 | ||
| 
						 | 
					ebd5feab9a | ||
| 
						 | 
					2454429915 | ||
| 
						 | 
					d13bfbf7c6 | ||
| 
						 | 
					c79fab4aa6 | ||
| 
						 | 
					bb79790662 | ||
| 
						 | 
					3b7a75a0ce | ||
| 
						 | 
					35a2227547 | ||
| 
						 | 
					28cf3043b6 | ||
| 
						 | 
					fccc9298b8 | ||
| 
						 | 
					ade76cd4ab | ||
| 
						 | 
					50a46abdd9 | ||
| 
						 | 
					069965f170 | ||
| 
						 | 
					99dd0d4092 | ||
| 
						 | 
					e257733d03 | ||
| 
						 | 
					d15422a951 | ||
| 
						 | 
					ffebe69866 | ||
| 
						 | 
					5666c63693 | ||
| 
						 | 
					187bce0724 | ||
| 
						 | 
					c902f7d05a | ||
| 
						 | 
					5428705eee | ||
| 
						 | 
					003caf24bb | ||
| 
						 | 
					328bb7f40f | ||
| 
						 | 
					c2319b4315 | ||
| 
						 | 
					3ae56c6cc4 | ||
| 
						 | 
					e23b16012f | ||
| 
						 | 
					3db088f7d7 | ||
| 
						 | 
					3be135f000 | ||
| 
						 | 
					d0edf6ad30 | ||
| 
						 | 
					efe03ae1af | ||
| 
						 | 
					c26d81842a | ||
| 
						 | 
					0deb3737c4 | ||
| 
						 | 
					ed236aa0d0 | ||
| 
						 | 
					acb6297e14 | ||
| 
						 | 
					4f68a7f5c7 | ||
| 
						 | 
					95ff9aaa0d | ||
| 
						 | 
					304357dcd4 | ||
| 
						 | 
					4d053ddae8 | ||
| 
						 | 
					113edcc755 | ||
| 
						 | 
					4049cd35d8 | ||
| 
						 | 
					7c1f6e4110 | ||
| 
						 | 
					80c6243e8b | ||
| 
						 | 
					62c184258b | ||
| 
						 | 
					a0020435f5 | ||
| 
						 | 
					4fc91a1427 | ||
| 
						 | 
					c7a5dbe3b3 | ||
| 
						 | 
					16a9efe3ab | ||
| 
						 | 
					fd75e6d4e5 | ||
| 
						 | 
					4463a24909 | ||
| 
						 | 
					780806f4d4 | ||
| 
						 | 
					2037663200 | ||
| 
						 | 
					5e5f462701 | ||
| 
						 | 
					0219d32505 | ||
| 
						 | 
					45691208ff | ||
| 
						 | 
					b3674092f2 | ||
| 
						 | 
					e8dad9dbe4 | ||
| 
						 | 
					6132833b51 | ||
| 
						 | 
					c6c06c92b2 | ||
| 
						 | 
					3c3533c5c8 | ||
| 
						 | 
					77aa8b9c86 | ||
| 
						 | 
					1e4ded3bc3 | ||
| 
						 | 
					c2bd8197e1 | ||
| 
						 | 
					0d7846fe15 | ||
| 
						 | 
					0eb3b021ee | ||
| 
						 | 
					b44c86d67c | ||
| 
						 | 
					0a654a5d5a | ||
| 
						 | 
					a3bcbfaeb1 | ||
| 
						 | 
					075f184b74 | ||
| 
						 | 
					dd020f13a6 | ||
| 
						 | 
					d3c145b98a | ||
| 
						 | 
					276988ec96 | ||
| 
						 | 
					316b75ecc2 | ||
| 
						 | 
					0aa0e556a1 | ||
| 
						 | 
					26e14d2ea1 | ||
| 
						 | 
					90d9e02f3a | ||
| 
						 | 
					2d2e9c0c0a | ||
| 
						 | 
					53a36fc0da | ||
| 
						 | 
					09cb14872e | ||
| 
						 | 
					26651d0519 | ||
| 
						 | 
					a02b03afa4 | ||
| 
						 | 
					ef46f450ee | ||
| 
						 | 
					0003778847 | ||
| 
						 | 
					8f91fb630c | ||
| 
						 | 
					d3c070ca6a | ||
| 
						 | 
					c633693a28 | ||
| 
						 | 
					590d34726d | ||
| 
						 | 
					e2b10e72a6 | ||
| 
						 | 
					6ef84acfec | ||
| 
						 | 
					bb72d326a0 | ||
| 
						 | 
					c11371a4e5 | ||
| 
						 | 
					3aecc51805 | ||
| 
						 | 
					0c239fc6c5 | ||
| 
						 | 
					e3a49d0cef | ||
| 
						 | 
					fd5d305a9f | ||
| 
						 | 
					24e50d4dea | ||
| 
						 | 
					c02db13e00 | ||
| 
						 | 
					acd181021d | ||
| 
						 | 
					0f710258c2 | ||
| 
						 | 
					77e898629e | ||
| 
						 | 
					95b305cc97 | ||
| 
						 | 
					381e5555a5 | ||
| 
						 | 
					7e401c1546 | ||
| 
						 | 
					6625fc53e0 | ||
| 
						 | 
					73ee3ef749 | ||
| 
						 | 
					67661b04f2 | ||
| 
						 | 
					945d18a5e2 | ||
| 
						 | 
					19a2ebd02f | ||
| 
						 | 
					6fc61407a3 | ||
| 
						 | 
					ff06c837b5 | ||
| 
						 | 
					97febca0f3 | ||
| 
						 | 
					cd96388857 | ||
| 
						 | 
					0056c5e40d | ||
| 
						 | 
					1478647932 | ||
| 
						 | 
					4c7fd2cfce | ||
| 
						 | 
					d91fb9f592 | ||
| 
						 | 
					4c44d63f01 | ||
| 
						 | 
					5c3bee5039 | ||
| 
						 | 
					f5abeebf49 | ||
| 
						 | 
					5ee41bda2c | ||
| 
						 | 
					86d518ec5b | ||
| 
						 | 
					ab9f21e68e | ||
| 
						 | 
					e7d9d97471 | ||
| 
						 | 
					aaeea91bd0 | ||
| 
						 | 
					7c68acc32e | ||
| 
						 | 
					fce01a5a16 | ||
| 
						 | 
					ff5ce773b2 | ||
| 
						 | 
					a1216fe3a2 | ||
| 
						 | 
					c63a8693bb | ||
| 
						 | 
					b22ac10c1a | ||
| 
						 | 
					32c3255e06 | ||
| 
						 | 
					7b0903557a | ||
| 
						 | 
					420ef64f18 | ||
| 
						 | 
					eb6e3d3613 | ||
| 
						 | 
					b7a4304f70 | ||
| 
						 | 
					2ed15898c4 | ||
| 
						 | 
					e93842b6aa | ||
| 
						 | 
					36cfa38760 | ||
| 
						 | 
					cac5cdd6f7 | ||
| 
						 | 
					621a05d12f | ||
| 
						 | 
					71600f0ce6 | ||
| 
						 | 
					426cb9f58f | ||
| 
						 | 
					e17ba7120f | ||
| 
						 | 
					6f2311270c | ||
| 
						 | 
					cdc62309b4 | ||
| 
						 | 
					f25e1ac31f | ||
| 
						 | 
					59577b577d | ||
| 
						 | 
					91bcefaa49 | ||
| 
						 | 
					4329fd5e47 | ||
| 
						 | 
					d850fc3e54 | ||
| 
						 | 
					a89dccf8f8 | ||
| 
						 | 
					7110c37d5e | ||
| 
						 | 
					88590fb342 | ||
| 
						 | 
					7e1161bd2d | ||
| 
						 | 
					1210b0d9f3 | ||
| 
						 | 
					21217695d3 | ||
| 
						 | 
					bd1db5d6b5 | ||
| 
						 | 
					b5e4a16e4a | ||
| 
						 | 
					c42c33e2a1 | ||
| 
						 | 
					086a151f94 | ||
| 
						 | 
					cea0e8e670 | ||
| 
						 | 
					b6709c8472 | ||
| 
						 | 
					3901be83dd | ||
| 
						 | 
					3f02f90f94 | ||
| 
						 | 
					5bf7f47083 | ||
| 
						 | 
					b16103c466 | ||
| 
						 | 
					2257a12013 | ||
| 
						 | 
					b314d1d3af | ||
| 
						 | 
					5fff37ecd4 | ||
| 
						 | 
					9331b6702c | ||
| 
						 | 
					04c43deb54 | ||
| 
						 | 
					664a1f88f2 | ||
| 
						 | 
					ad6fd8ed4d | ||
| 
						 | 
					4e176ff358 | ||
| 
						 | 
					78fc78e0f6 | ||
| 
						 | 
					4f145468f4 | ||
| 
						 | 
					bdbd2e04c8 | ||
| 
						 | 
					b82d993b03 | ||
| 
						 | 
					bf3f9bdaae | ||
| 
						 | 
					8acb3a1238 | ||
| 
						 | 
					414b6e7c00 | ||
| 
						 | 
					f2db7ed71e | ||
| 
						 | 
					47cdadc626 | ||
| 
						 | 
					ca1ea0ac09 | ||
| 
						 | 
					172d6c0d44 | ||
| 
						 | 
					f0dee6578a | ||
| 
						 | 
					7fb54ae3b3 | ||
| 
						 | 
					0498682406 | ||
| 
						 | 
					9fd022a905 | ||
| 
						 | 
					784657c379 | ||
| 
						 | 
					653c83b9b4 | ||
| 
						 | 
					a65efe4b75 | ||
| 
						 | 
					e160f9419c | ||
| 
						 | 
					e95cc0dce3 | ||
| 
						 | 
					4b7526d001 | ||
| 
						 | 
					d0247f53ae | ||
| 
						 | 
					6630e2be01 | ||
| 
						 | 
					36d8d7ae81 | ||
| 
						 | 
					80e872df2b | ||
| 
						 | 
					ece75acd6b | ||
| 
						 | 
					9779220286 | ||
| 
						 | 
					de3c9791b0 | ||
| 
						 | 
					9b006e00ab | ||
| 
						 | 
					5a95679e58 | ||
| 
						 | 
					e23e2759fc | ||
| 
						 | 
					a2ee2fe360 | ||
| 
						 | 
					b4334b2b87 | ||
| 
						 | 
					4586d8769b | ||
| 
						 | 
					789cf43f18 | ||
| 
						 | 
					2da507defd | ||
| 
						 | 
					93b76c048f | ||
| 
						 | 
					be599f845f | ||
| 
						 | 
					f945672623 | ||
| 
						 | 
					8f8d152b2e | ||
| 
						 | 
					c3ef5952f5 | ||
| 
						 | 
					5b974ed6a1 | ||
| 
						 | 
					e312cf26ea | ||
| 
						 | 
					b95d252c34 | ||
| 
						 | 
					a087e348ab | ||
| 
						 | 
					ea895e6839 | ||
| 
						 | 
					d23f90726a | ||
| 
						 | 
					1d5971db24 | ||
| 
						 | 
					845117bd05 | ||
| 
						 | 
					9ad72cd9b1 | ||
| 
						 | 
					b99db9ea7b | ||
| 
						 | 
					eb1f282b73 | 
							
								
								
									
										1042
									
								
								Make-config
									
									
									
									
									
								
							
							
						
						
									
										1042
									
								
								Make-config
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										694
									
								
								Makefile.X11
									
									
									
									
									
								
							
							
						
						
									
										694
									
								
								Makefile.X11
									
									
									
									
									
								
							@@ -1,9 +1,9 @@
 | 
			
		||||
# $Id: Makefile.X11,v 1.12 1999/11/04 03:57:28 gareth Exp $
 | 
			
		||||
# $Id: Makefile.X11,v 1.56.2.13 2002/09/19 16:36:35 brianp Exp $
 | 
			
		||||
 | 
			
		||||
# Mesa 3-D graphics library
 | 
			
		||||
# Version:  3.1
 | 
			
		||||
# Version:  4.0.4
 | 
			
		||||
# 
 | 
			
		||||
# Copyright (C) 1999  Brian Paul   All Rights Reserved.
 | 
			
		||||
# Copyright (C) 1999-2002  Brian Paul   All Rights Reserved.
 | 
			
		||||
# 
 | 
			
		||||
# Permission is hereby granted, free of charge, to any person obtaining a
 | 
			
		||||
# copy of this software and associated documentation files (the "Software"),
 | 
			
		||||
@@ -42,6 +42,7 @@ default:
 | 
			
		||||
	@echo "  make bsdos4               for BSD/OS 4.x, dynamic libraries"
 | 
			
		||||
	@echo "  make cygnus               for Win95/NT using Cygnus-Win32"
 | 
			
		||||
	@echo "  make cygnus-linux         for Win95/NT using Cygnus-Win32 under Linux"
 | 
			
		||||
	@echo "  make darwin               for Darwin - Mac OS X"
 | 
			
		||||
	@echo "  make dgux                 for Data General"
 | 
			
		||||
	@echo "  make freebsd              for FreeBSD systems with GCC"
 | 
			
		||||
	@echo "  make freebsd-386          for FreeBSD systems with GCC, w/ Intel assembly"
 | 
			
		||||
@@ -66,28 +67,27 @@ default:
 | 
			
		||||
	@echo "  make irix6-64             for SGI systems with IRIX 6.x, make 64-bit libs"
 | 
			
		||||
	@echo "  make irix6-64-dso         for SGI systems with IRIX 6.x, make 64-bit DSOs"
 | 
			
		||||
 | 
			
		||||
	@echo "  make linux                for Linux systems, make static .a libs"
 | 
			
		||||
	@echo "  make linux-elf            for Linux systems, make ELF shared libs"
 | 
			
		||||
	@echo "  make linux-386            for Linux w/ Intel assembly"
 | 
			
		||||
	@echo "  make linux-386-elf        for Linux w/ Intel assembly, make ELF shared libs"
 | 
			
		||||
	@echo "  make linux                for Linux systems, make shared .so libs"
 | 
			
		||||
	@echo "  make linux-static         for Linux systems, make static .a libs"
 | 
			
		||||
	@echo "  make linux-trace          for Linux systems, with API trace extension"
 | 
			
		||||
	@echo "  make linux-x86            for Linux on Intel, make shared .so libs"
 | 
			
		||||
	@echo "  make linux-x86-static     for Linux on Intel, make static .a libs"
 | 
			
		||||
	@echo "  make linux-ggi            for Linux systems with libggi"
 | 
			
		||||
	@echo "  make linux-386-ggi        for Linux systems with libggi w/ Intel assembly"
 | 
			
		||||
	@echo "  make linux-alpha          for Linux on Alpha systems"
 | 
			
		||||
	@echo "  make linux-alpha-elf      for Linux on Alpha systems, make ELF shared libs"
 | 
			
		||||
	@echo "  make linux-ppc            for Linux on PowerPC systems"
 | 
			
		||||
	@echo "  make linux-ppc-so         for Linux on PowerPC systems, make shared libs"
 | 
			
		||||
	@echo "  make linux-glide          for Linux w/ 3Dfx Glide driver"
 | 
			
		||||
	@echo "  make linux-386-glide      for Linux w/ 3Dfx Glide driver, Intel assembly"
 | 
			
		||||
	@echo "  make linux-386-opt-glide  for Linux with 3Dfx Voodoo1 for GLQuake"
 | 
			
		||||
	@echo "  make linux-386-opt-V2-glide  for Linux with 3Dfx Voodoo2 for GLQuake"
 | 
			
		||||
	@echo "  make linux-3dnow          for Linux on AMD w/ 3DNow!"
 | 
			
		||||
	@echo "  make linux-3dnow-glide    for Linux on AMD w/ 3DNow! for Glide"
 | 
			
		||||
	@echo "  make linux-386-pthread    for Linux w/ Intel assembly and linuxthreads"
 | 
			
		||||
	@echo "  make linux-386-pthread-shared  for Linux w/ Intel assembly and linuxthreads"
 | 
			
		||||
	@echo "  make linux-386-pthread-shared-glide  for Linux w/ Intel assembly, linuxthreads, and 3Dfx Glide driver"
 | 
			
		||||
	@echo "  make linux-x86-glide      for Linux w/ all x86 asm for Glide"
 | 
			
		||||
	@echo "  make linux-alpha          for Linux on Alpha systems"
 | 
			
		||||
	@echo "  make linux-alpha-static   for Linux on Alpha systems, static libs"
 | 
			
		||||
	@echo "  make linux-ppc            for Linux on PowerPC systems"
 | 
			
		||||
	@echo "  make linux-ppc-static     for Linux on PowerPC systems, static libs"
 | 
			
		||||
	@echo "  make linux-sparc          for Linux on Sparc systems"
 | 
			
		||||
	@echo "  make linux-sparc5-elf     for Sparc5 systems, make ELF shared libs"
 | 
			
		||||
	@echo "  make linux-sparc-ultra    for UltraSparc systems, make ELF shared libs"
 | 
			
		||||
	@echo "  make linux-osmesa16       for 16-bit/channel OSMesa"
 | 
			
		||||
	@echo "  make linux-osmesa32       for 32-bit/channel OSMesa"
 | 
			
		||||
	@echo "  make linux-icc            for Linux with the Intel C/C++ compiler"
 | 
			
		||||
	@echo "  make lynxos               for LynxOS systems with GCC"
 | 
			
		||||
	@echo "  make macintosh            for Macintosh"
 | 
			
		||||
	@echo "  make machten-2.2          for Macs w/ MachTen 2.2 (68k w/ FPU)"
 | 
			
		||||
@@ -136,18 +136,19 @@ default:
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
aix aix-sl amix bsdos bsdos4 dgux freebsd freebsd-386 gcc \
 | 
			
		||||
# XXX we may have to split up this group of targets into those that
 | 
			
		||||
# have a C++ compiler and those that don't for the SI-GLU library.
 | 
			
		||||
 | 
			
		||||
aix aix-sl amix bsdos bsdos4 darwin dgux freebsd freebsd-386 gcc \
 | 
			
		||||
hpux9 hpux9-sl hpux9-gcc hpux9-gcc-sl \
 | 
			
		||||
hpux10 hpux10-sl hpux10-gcc hpux10-gcc-sl \
 | 
			
		||||
irix4 irix5 irix5-gcc irix5-dso irix6-o32 irix6-o32-dso \
 | 
			
		||||
linux linux-debug linux-prof linux-elf linux-elf-debug linux-glide-debug \
 | 
			
		||||
irix4 irix5 irix5-gcc irix5-dso \
 | 
			
		||||
linux linux-static linux-debug linux-x11-debug linux-static-debug linux-prof \
 | 
			
		||||
linux-x86 linux-icc linux-x86-static linux-x86-debug \
 | 
			
		||||
linux-glide linux-386-glide linux-386-opt-glide \
 | 
			
		||||
linux-386-opt-V2-glide \
 | 
			
		||||
linux-386 linux-386-elf \
 | 
			
		||||
linux-3dnow linux-3dnow-glide \
 | 
			
		||||
linux-alpha linux-alpha-elf \
 | 
			
		||||
linux-ppc linux-ppc-so \
 | 
			
		||||
linux-386-pthread linux-386-pthread-shared linux-386-pthread-shared-glide \
 | 
			
		||||
linux-x86-glide linux-glide-debug linux-glide-prof \
 | 
			
		||||
linux-alpha-static linux-alpha \
 | 
			
		||||
linux-ppc-static linux-ppc \
 | 
			
		||||
linux-sparc \
 | 
			
		||||
linux-sparc5-elf \
 | 
			
		||||
linux-sparc-ultra \
 | 
			
		||||
@@ -159,30 +160,33 @@ sunos5 sunos5-sl sunos5-ultra sunos5-ultra-sl sunos5-gcc sunos5-gcc-sl \
 | 
			
		||||
sunos5-thread sunos5-pthread sunos5-gcc-thread sunos5-gcc-pthread \
 | 
			
		||||
sunos5-x11r6-gcc-sl ultrix-gcc unicos unixware uwin vistra:
 | 
			
		||||
	-mkdir lib
 | 
			
		||||
	touch src/depend
 | 
			
		||||
	touch src-glu/depend
 | 
			
		||||
	if [ -d src      ] ; then touch src/depend      ; fi
 | 
			
		||||
	if [ -d si-glu   ] ; then touch si-glu/depend  ; fi
 | 
			
		||||
	if [ -d src-glut ] ; then touch src-glut/depend ; fi
 | 
			
		||||
	cd src ; $(MAKE) -f Makefile.X11 $@
 | 
			
		||||
	cd src-glu ; $(MAKE) -f Makefile.X11 $@
 | 
			
		||||
	if [ -d widgets-sgi ] ; then touch widgets-sgi/depend ; fi
 | 
			
		||||
	if [ -d src      ] ; then cd src      ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d si-glu   ] ; then cd si-glu   ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d src-glut ] ; then cd src-glut ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d demos ]    ; then cd demos    ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d xdemos ]   ; then cd xdemos   ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d samples ]  ; then cd samples  ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d book ]     ; then cd book     ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d demos    ] ; then cd demos    ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d xdemos   ] ; then cd xdemos   ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d samples  ] ; then cd samples  ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d book     ] ; then cd book     ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d widgets-sgi ] ; then cd widgets-sgi; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
irix6-n32 irix6-n32-dso irix6-gcc-n32-sl irix-debug:
 | 
			
		||||
irix6-o32 irix6-o32-dso irix6-n32 irix6-n32-dso irix6-gcc-n32-sl irix-debug:
 | 
			
		||||
	-mkdir lib32
 | 
			
		||||
	touch src/depend
 | 
			
		||||
	touch src-glu/depend
 | 
			
		||||
	if [ -d src      ] ; then touch src/depend      ; fi
 | 
			
		||||
	if [ -d src-glu  ] ; then touch src-glu/depend  ; fi
 | 
			
		||||
	if [ -d src-glut ] ; then touch src-glut/depend ; fi
 | 
			
		||||
	cd src ; $(MAKE) -f Makefile.X11 $@
 | 
			
		||||
	cd src-glu ; $(MAKE) -f Makefile.X11 $@
 | 
			
		||||
	if [ -d widgets-sgi ] ; then touch widgets-sgi/depend ; fi
 | 
			
		||||
	if [ -d src      ] ; then cd src      ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d src-glu  ] ; then cd src-glu  ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d src-glut ] ; then cd src-glut ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d demos ]    ; then cd demos    ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d xdemos ]   ; then cd xdemos   ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d samples ]  ; then cd samples  ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d book ]     ; then cd book     ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d demos    ] ; then cd demos    ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d xdemos   ] ; then cd xdemos   ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d samples  ] ; then cd samples  ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d book     ] ; then cd book     ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d widgets-sgi ] ; then cd widgets-sgi; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
irix6-64 irix6-64-dso:
 | 
			
		||||
@@ -190,13 +194,15 @@ irix6-64 irix6-64-dso:
 | 
			
		||||
	touch src/depend
 | 
			
		||||
	touch src-glu/depend
 | 
			
		||||
	if [ -d src-glut ] ; then touch src-glut/depend ; fi
 | 
			
		||||
	cd src ; $(MAKE) -f Makefile.X11 $@
 | 
			
		||||
	cd src-glu ; $(MAKE) -f Makefile.X11 $@
 | 
			
		||||
	if [ -d widgets-sgi ] ; then touch widgets-sgi/depend ; fi
 | 
			
		||||
	if [ -d src      ] ; then cd src      ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d src-glu  ] ; then cd src-glu  ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d src-glut ] ; then cd src-glut ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d demos ]    ; then cd demos    ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d xdemos ]   ; then cd xdemos   ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d samples ]  ; then cd samples  ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d book ]     ; then cd book     ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d demos    ] ; then cd demos    ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d xdemos   ] ; then cd xdemos   ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d samples  ] ; then cd samples  ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d book     ] ; then cd book     ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d widgets-sgi ] ; then cd widgets-sgi; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
amiwin:
 | 
			
		||||
@@ -209,25 +215,27 @@ beos-r4:
 | 
			
		||||
	touch src/depend
 | 
			
		||||
	-rm src-glu/depend
 | 
			
		||||
	touch src-glu/depend
 | 
			
		||||
	cd src ; $(MAKE) -f Makefile.BeOS-R4 $@
 | 
			
		||||
	cd src-glu ; $(MAKE) -f Makefile.BeOS-R4 $@
 | 
			
		||||
	if [ -d BeOS ]          ; then cd BeOS          ; $(MAKE) ; fi
 | 
			
		||||
	if [ -d src-glut.beos ] ; then cd src-glut.beos ; $(MAKE) ; fi
 | 
			
		||||
	if [ -d src     ] ; then cd src     ; $(MAKE) -f Makefile.BeOS-R4 $@ ; fi
 | 
			
		||||
	if [ -d src-glu ] ; then cd src-glu ; $(MAKE) -f Makefile.BeOS-R4 $@ ; fi
 | 
			
		||||
	if [ -d BeOS    ] ; then cd BeOS    ; $(MAKE)                        ; fi
 | 
			
		||||
	if [ -d src-glut.beos ] ; then cd src-glut.beos ; $(MAKE)            ; fi
 | 
			
		||||
	if [ -d src-glut.beos ] ; then cp src-glut.beos/obj*/libglut.so lib  ; fi
 | 
			
		||||
	if [ -d demos ]   ; then cd demos   ; $(MAKE) -f Makefile.BeOS-R4 $@ ; fi
 | 
			
		||||
	if [ -d demos   ] ; then cd demos   ; $(MAKE) -f Makefile.BeOS-R4 $@ ; fi
 | 
			
		||||
	if [ -d samples ] ; then cd samples ; $(MAKE) -f Makefile.BeOS-R4 $@ ; fi
 | 
			
		||||
	if [ -d book ]    ; then cd book    ; $(MAKE) -f Makefile.BeOS-R4 $@ ; fi
 | 
			
		||||
	if [ -d book    ] ; then cd book    ; $(MAKE) -f Makefile.BeOS-R4 $@ ; fi
 | 
			
		||||
 | 
			
		||||
pgi-cygnus pgi-mingw32 \
 | 
			
		||||
cygnus cygnus-linux:
 | 
			
		||||
	-mkdir lib
 | 
			
		||||
	touch src/depend
 | 
			
		||||
	touch src-glu/depend
 | 
			
		||||
	cd src ; $(MAKE) -f Makefile.X11 $@
 | 
			
		||||
	cd src-glu ; $(MAKE) -f Makefile.X11 $@
 | 
			
		||||
	cd src-glut ; $(MAKE) -f Makefile.X11 $@
 | 
			
		||||
	cd demos ; $(MAKE) -f Makefile.X11 $@
 | 
			
		||||
	if [ -d xdemos ]  ; then cd xdemos  ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d widgets-sgi ] ; then touch widgets-sgi/depend ; fi
 | 
			
		||||
	if [ -d src      ] ; then cd src      ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d src-glu  ] ; then cd src-glu  ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d src-glut ] ; then cd src-glut ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d demos    ] ; then cd demos    ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d xdemos   ] ; then cd xdemos   ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d widgets-sgi ] ; then cd widgets-sgi; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
 | 
			
		||||
macintosh:
 | 
			
		||||
	@echo "See the README file for Macintosh intallation information"
 | 
			
		||||
@@ -258,20 +266,22 @@ os2-x11:
 | 
			
		||||
linux-ggi linux-386-ggi:
 | 
			
		||||
	-mkdir lib
 | 
			
		||||
	touch src/depend
 | 
			
		||||
	touch src-glu/depend
 | 
			
		||||
	if [ -d src-glut ] ; then touch src-glut/depend ; fi
 | 
			
		||||
	if [ -d ggi ] ; then touch ggi/depend ; fi
 | 
			
		||||
	cd src ; $(MAKE) -f Makefile.X11 $@
 | 
			
		||||
	cd src/GGI/default ; $(MAKE)
 | 
			
		||||
	cd src/GGI/display ; $(MAKE)
 | 
			
		||||
	cd src-glu ; $(MAKE) -f Makefile.X11 $@
 | 
			
		||||
	touch si-glu/depend
 | 
			
		||||
	if [ -d src-glut        ] ; then touch src-glut/depend ; fi
 | 
			
		||||
	if [ -d widgets-sgi     ] ; then touch widgets-sgi/depend ; fi
 | 
			
		||||
	if [ -d ggi             ] ; then touch ggi/depend      ; fi
 | 
			
		||||
	if [ -d src             ] ; then cd src ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d src/GGI/default ] ; then cd src/GGI/default ; $(MAKE)      ; fi
 | 
			
		||||
	if [ -d src/GGI/display ] ; then cd src/GGI/display ; $(MAKE)      ; fi
 | 
			
		||||
	if [ -d si-glu ]   ; then cd si-glu   ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
#	if [ -d src-glut ] ; then cd src-glut ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d ggi ]      ; then cd ggi      ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d ggi ]      ; then cd ggi/demos; $(MAKE)    ; fi
 | 
			
		||||
	if [ -d ggi ]      ; then cd ggi/demos; $(MAKE)                    ; fi
 | 
			
		||||
	if [ -d demos ]    ; then cd demos    ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d xdemos ]   ; then cd xdemos   ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d samples ]  ; then cd samples  ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d book ]     ; then cd book     ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d widgets-sgi ] ; then cd widgets-sgi; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
 | 
			
		||||
# if you change GGI_DEST please change it in ggimesa.conf, too.
 | 
			
		||||
DESTDIR=/usr/local
 | 
			
		||||
@@ -286,6 +296,11 @@ linux-ggi-install linux-386-ggi-install:
 | 
			
		||||
#	echo ".include $(DESTDIR)/etc/ggi/ggimesa.conf" >> $(DESTDIR)/etc/ggi/libggi.conf ; \
 | 
			
		||||
#	fi
 | 
			
		||||
 | 
			
		||||
linux-osmesa16 linux-osmesa32:
 | 
			
		||||
	-mkdir lib
 | 
			
		||||
	if [ -d src ] ; then touch src/depend ; fi
 | 
			
		||||
	if [ -d src ] ; then cd src ; $(MAKE) -f Makefile.OSMesa16 $@ ; fi
 | 
			
		||||
 | 
			
		||||
# Remove .o files, emacs backup files, etc.
 | 
			
		||||
clean:
 | 
			
		||||
	-rm -f ggi/*~ *.o
 | 
			
		||||
@@ -295,211 +310,321 @@ clean:
 | 
			
		||||
	-rm -f include/GL/*~
 | 
			
		||||
	-rm -f src/*.o src/*~ src/*.a src/*/*.o src/*/*~
 | 
			
		||||
	-rm -f src-glu/*.o src-glu/*~ src-glu/*.a
 | 
			
		||||
	-rm -f si-glu/*/*.o si-glu/*/*/*.o
 | 
			
		||||
	-rm -f src-glut/*.o
 | 
			
		||||
	-rm -f demos/*.o
 | 
			
		||||
	-rm -f book/*.o book/*~
 | 
			
		||||
	-rm -f xdemos/*.o xdemos/*~
 | 
			
		||||
	-rm -f samples/*.o samples/*~
 | 
			
		||||
	-rm -f ggi/*.o ggi/demos/*.o ggi/*.a
 | 
			
		||||
	-rm -f widgets-sgi/*.o
 | 
			
		||||
	-rm -f widgets-mesa/*/*.o
 | 
			
		||||
 | 
			
		||||
# Remove everything that can be remade
 | 
			
		||||
realclean: clean
 | 
			
		||||
	-rm -f lib/*
 | 
			
		||||
	-rm -fr lib lib32 lib64
 | 
			
		||||
	cd demos       && $(MAKE) -f Makefile.X11 realclean || true
 | 
			
		||||
	cd xdemos      && $(MAKE) -f Makefile.X11 realclean || true
 | 
			
		||||
	cd book        && $(MAKE) -f Makefile.X11 realclean || true
 | 
			
		||||
	cd samples     && $(MAKE) -f Makefile.X11 realclean || true
 | 
			
		||||
	cd ggi/demos   && $(MAKE) -f Makefile.X11 realclean || true
 | 
			
		||||
	cd src/GGI/default && $(MAKE) -f Makefile.X11 realclean || true
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
DIRECTORY = Mesa-3.1
 | 
			
		||||
LIB_NAME = MesaLib-3.1beta3
 | 
			
		||||
DEMO_NAME = MesaDemos-3.1beta3
 | 
			
		||||
DIRECTORY = Mesa-4.0.4
 | 
			
		||||
LIB_NAME = MesaLib-4.0.4
 | 
			
		||||
DEMO_NAME = MesaDemos-4.0.4
 | 
			
		||||
GLU_NAME = MesaGLU-4.0.4
 | 
			
		||||
GLUT_NAME = GLUT-3.7
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
LIB_FILES =	\
 | 
			
		||||
	$(DIRECTORY)/Makefile*			\
 | 
			
		||||
	$(DIRECTORY)/Make-config		\
 | 
			
		||||
	$(DIRECTORY)/acconfig.h			\
 | 
			
		||||
	$(DIRECTORY)/acinclude.m4		\
 | 
			
		||||
	$(DIRECTORY)/aclocal.m4			\
 | 
			
		||||
	$(DIRECTORY)/conf.h.in			\
 | 
			
		||||
	$(DIRECTORY)/config.guess		\
 | 
			
		||||
	$(DIRECTORY)/config.sub			\
 | 
			
		||||
	$(DIRECTORY)/configure			\
 | 
			
		||||
	$(DIRECTORY)/configure.in		\
 | 
			
		||||
	$(DIRECTORY)/install-sh			\
 | 
			
		||||
	$(DIRECTORY)/ltconfig			\
 | 
			
		||||
	$(DIRECTORY)/ltmain.sh			\
 | 
			
		||||
	$(DIRECTORY)/missing			\
 | 
			
		||||
	$(DIRECTORY)/mkinstalldirs		\
 | 
			
		||||
	$(DIRECTORY)/stamp-h.in			\
 | 
			
		||||
	$(DIRECTORY)/configure			\
 | 
			
		||||
	$(DIRECTORY)/docs/CONFIG		\
 | 
			
		||||
	$(DIRECTORY)/docs/CONFORM		\
 | 
			
		||||
	$(DIRECTORY)/docs/COPYING		\
 | 
			
		||||
	$(DIRECTORY)/docs/COPYRIGHT		\
 | 
			
		||||
	$(DIRECTORY)/docs/DEVINFO		\
 | 
			
		||||
	$(DIRECTORY)/docs/IAFA-PACKAGE		\
 | 
			
		||||
	$(DIRECTORY)/docs/INSTALL		\
 | 
			
		||||
	$(DIRECTORY)/docs/INSTALL.GNU		\
 | 
			
		||||
	$(DIRECTORY)/docs/README		\
 | 
			
		||||
	$(DIRECTORY)/docs/README.*		\
 | 
			
		||||
	$(DIRECTORY)/docs/RELNOTES		\
 | 
			
		||||
	$(DIRECTORY)/docs/VERSIONS		\
 | 
			
		||||
	$(DIRECTORY)/docs/*.spec		\
 | 
			
		||||
	$(DIRECTORY)/bin/README			\
 | 
			
		||||
	$(DIRECTORY)/bin/mklib*			\
 | 
			
		||||
	$(DIRECTORY)/*.BAT			\
 | 
			
		||||
	$(DIRECTORY)/*.bat			\
 | 
			
		||||
	$(DIRECTORY)/descrip.mms		\
 | 
			
		||||
	$(DIRECTORY)/mms-config			\
 | 
			
		||||
	$(DIRECTORY)/xlib.opt			\
 | 
			
		||||
	$(DIRECTORY)/STARTUP.MK			\
 | 
			
		||||
	$(DIRECTORY)/mesawin32.mak		\
 | 
			
		||||
	$(DIRECTORY)/Names.win			\
 | 
			
		||||
	$(DIRECTORY)/win32-openstep.sh		\
 | 
			
		||||
	$(DIRECTORY)/*.dja			\
 | 
			
		||||
	$(DIRECTORY)/include/GL/Makefile.in	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/Makefile.am	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/dosmesa.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/foomesa.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/fxmesa.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/ggimesa.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/gl.h		\
 | 
			
		||||
	$(DIRECTORY)/include/GL/gl_mangle.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glu.h		\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glu_mangle.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glx.h		\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glx_mangle.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/mglmesa.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/osmesa.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/svgamesa.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/wmesa.h		\
 | 
			
		||||
	$(DIRECTORY)/include/GL/xmesa.h		\
 | 
			
		||||
	$(DIRECTORY)/include/GL/xmesa_x.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/xmesa_xf86.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GLView.h		\
 | 
			
		||||
	$(DIRECTORY)/include/Makefile.in	\
 | 
			
		||||
	$(DIRECTORY)/include/Makefile.am	\
 | 
			
		||||
	$(DIRECTORY)/src/Makefile*		\
 | 
			
		||||
	$(DIRECTORY)/src/descrip.mms		\
 | 
			
		||||
	$(DIRECTORY)/src/mms_depend		\
 | 
			
		||||
	$(DIRECTORY)/src/mesa.conf		\
 | 
			
		||||
	$(DIRECTORY)/src/*.def			\
 | 
			
		||||
	$(DIRECTORY)/src/depend			\
 | 
			
		||||
	$(DIRECTORY)/src/*.[chS]		\
 | 
			
		||||
	$(DIRECTORY)/src/Allegro/*.[ch]		\
 | 
			
		||||
	$(DIRECTORY)/src/BeOS/*.cpp		\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*.cpp		\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*.CPP		\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*.h		\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*.H		\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*.c		\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*.C		\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/MAKEFILE		\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*bat		\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*DEF		\
 | 
			
		||||
	$(DIRECTORY)/src/DOS/DEPEND.DOS		\
 | 
			
		||||
	$(DIRECTORY)/src/DOS/*.c		\
 | 
			
		||||
	$(DIRECTORY)/src/FX/Makefile.am		\
 | 
			
		||||
	$(DIRECTORY)/src/FX/Makefile.in		\
 | 
			
		||||
	$(DIRECTORY)/src/FX/*.[ch]		\
 | 
			
		||||
	$(DIRECTORY)/src/FX/*.def		\
 | 
			
		||||
	$(DIRECTORY)/src/FX/X86/Makefile.am	\
 | 
			
		||||
	$(DIRECTORY)/src/FX/X86/Makefile.in	\
 | 
			
		||||
	$(DIRECTORY)/src/FX/X86/*.[Shc]		\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/Makefile.am			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/Makefile.in			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/ggimesa.conf.in			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/default/*.c			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/default/Makefile.am		\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/default/Makefile.in		\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/default/genkgi.conf.in		\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/display/*.c			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/display/Makefile.am		\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/display/Makefile.in		\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/display/fbdev.conf.in		\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/include/Makefile.am		\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/include/Makefile.in		\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/include/ggi/Makefile.am		\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/include/ggi/Makefile.in		\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/include/ggi/mesa/Makefile.am	\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/include/ggi/mesa/Makefile.in	\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/include/ggi/mesa/*.h		\
 | 
			
		||||
	$(DIRECTORY)/src/KNOWN_BUGS		\
 | 
			
		||||
	$(DIRECTORY)/src/MGL/*.[ch]		\
 | 
			
		||||
	$(DIRECTORY)/src/MGL/*.txt		\
 | 
			
		||||
	$(DIRECTORY)/src/OSmesa/Makefile.am	\
 | 
			
		||||
	$(DIRECTORY)/src/OSmesa/Makefile.in	\
 | 
			
		||||
	$(DIRECTORY)/src/OSmesa/*.[ch]		\
 | 
			
		||||
	$(DIRECTORY)/src/S3/*.[ch]		\
 | 
			
		||||
	$(DIRECTORY)/src/S3/*.def		\
 | 
			
		||||
	$(DIRECTORY)/src/S3/*.mak		\
 | 
			
		||||
	$(DIRECTORY)/src/S3/*.rc		\
 | 
			
		||||
	$(DIRECTORY)/src/SVGA/Makefile.am	\
 | 
			
		||||
	$(DIRECTORY)/src/SVGA/Makefile.in	\
 | 
			
		||||
	$(DIRECTORY)/src/SVGA/*.[ch]		\
 | 
			
		||||
	$(DIRECTORY)/src/Windows/*.[ch]		\
 | 
			
		||||
	$(DIRECTORY)/src/Windows/*.def		\
 | 
			
		||||
	$(DIRECTORY)/src/X/Makefile.am		\
 | 
			
		||||
	$(DIRECTORY)/src/X/Makefile.in		\
 | 
			
		||||
	$(DIRECTORY)/src/X/*.[ch]		\
 | 
			
		||||
	$(DIRECTORY)/src/X86/*.[ch]		\
 | 
			
		||||
	$(DIRECTORY)/src/X86/Makefile.am	\
 | 
			
		||||
	$(DIRECTORY)/src/X86/Makefile.in	\
 | 
			
		||||
	$(DIRECTORY)/src/X86/*.m4		\
 | 
			
		||||
	$(DIRECTORY)/src/X86/*.S		\
 | 
			
		||||
	$(DIRECTORY)/src/*.dja			\
 | 
			
		||||
	$(DIRECTORY)/src-glu/README[12]		\
 | 
			
		||||
	$(DIRECTORY)/src-glu/Makefile*		\
 | 
			
		||||
	$(DIRECTORY)/src-glu/descrip.mms	\
 | 
			
		||||
	$(DIRECTORY)/src-glu/mms_depend		\
 | 
			
		||||
	$(DIRECTORY)/src-glu/*.def		\
 | 
			
		||||
	$(DIRECTORY)/src-glu/*.dja		\
 | 
			
		||||
	$(DIRECTORY)/src-glu/depend		\
 | 
			
		||||
	$(DIRECTORY)/src-glu/*.[ch]		\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa		\
 | 
			
		||||
	$(DIRECTORY)/widgets-sgi		\
 | 
			
		||||
	$(DIRECTORY)/util/README		\
 | 
			
		||||
	$(DIRECTORY)/util/Makefile.am		\
 | 
			
		||||
	$(DIRECTORY)/util/Makefile.in		\
 | 
			
		||||
	$(DIRECTORY)/util/*.[ch]		\
 | 
			
		||||
	$(DIRECTORY)/util/sampleMakefile	\
 | 
			
		||||
	$(DIRECTORY)/BeOS/Makefile		\
 | 
			
		||||
	$(DIRECTORY)/BeOS/*.cpp			
 | 
			
		||||
	$(DIRECTORY)/Makefile*						\
 | 
			
		||||
	$(DIRECTORY)/Make-config					\
 | 
			
		||||
	$(DIRECTORY)/acconfig.h						\
 | 
			
		||||
	$(DIRECTORY)/acinclude.m4					\
 | 
			
		||||
	$(DIRECTORY)/aclocal.m4						\
 | 
			
		||||
	$(DIRECTORY)/common_rules.make					\
 | 
			
		||||
	$(DIRECTORY)/conf.h.in						\
 | 
			
		||||
	$(DIRECTORY)/config.guess					\
 | 
			
		||||
	$(DIRECTORY)/config.sub						\
 | 
			
		||||
	$(DIRECTORY)/configure						\
 | 
			
		||||
	$(DIRECTORY)/configure.in					\
 | 
			
		||||
	$(DIRECTORY)/install-sh						\
 | 
			
		||||
	$(DIRECTORY)/ltconfig						\
 | 
			
		||||
	$(DIRECTORY)/ltmain.sh						\
 | 
			
		||||
	$(DIRECTORY)/missing						\
 | 
			
		||||
	$(DIRECTORY)/mkinstalldirs					\
 | 
			
		||||
	$(DIRECTORY)/stamp-h.in						\
 | 
			
		||||
	$(DIRECTORY)/docs/CONFIG					\
 | 
			
		||||
	$(DIRECTORY)/docs/CONFORM					\
 | 
			
		||||
	$(DIRECTORY)/docs/COPYING					\
 | 
			
		||||
	$(DIRECTORY)/docs/COPYRIGHT					\
 | 
			
		||||
	$(DIRECTORY)/docs/DEVINFO					\
 | 
			
		||||
	$(DIRECTORY)/docs/IAFA-PACKAGE					\
 | 
			
		||||
	$(DIRECTORY)/docs/INSTALL					\
 | 
			
		||||
	$(DIRECTORY)/docs/INSTALL.GNU					\
 | 
			
		||||
	$(DIRECTORY)/docs/README					\
 | 
			
		||||
	$(DIRECTORY)/docs/README.*					\
 | 
			
		||||
	$(DIRECTORY)/docs/RELNOTES*					\
 | 
			
		||||
	$(DIRECTORY)/docs/VERSIONS					\
 | 
			
		||||
	$(DIRECTORY)/docs/*.spec					\
 | 
			
		||||
	$(DIRECTORY)/bin/README						\
 | 
			
		||||
	$(DIRECTORY)/bin/mklib*						\
 | 
			
		||||
	$(DIRECTORY)/descrip.mms					\
 | 
			
		||||
	$(DIRECTORY)/mms-config						\
 | 
			
		||||
	$(DIRECTORY)/m4/*.m4						\
 | 
			
		||||
	$(DIRECTORY)/xlib.opt						\
 | 
			
		||||
	$(DIRECTORY)/mesawin32.mak					\
 | 
			
		||||
	$(DIRECTORY)/include/GL/internal/glcore.h			\
 | 
			
		||||
	$(DIRECTORY)/include/GL/Makefile.in				\
 | 
			
		||||
	$(DIRECTORY)/include/GL/Makefile.am				\
 | 
			
		||||
	$(DIRECTORY)/include/GL/dmesa.h					\
 | 
			
		||||
	$(DIRECTORY)/include/GL/amesa.h					\
 | 
			
		||||
	$(DIRECTORY)/include/GL/fxmesa.h				\
 | 
			
		||||
	$(DIRECTORY)/include/GL/ggimesa.h				\
 | 
			
		||||
	$(DIRECTORY)/include/GL/gl.h					\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glext.h					\
 | 
			
		||||
	$(DIRECTORY)/include/GL/gl_mangle.h				\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glu.h					\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glu_mangle.h				\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glx.h					\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glxext.h				\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glx_mangle.h				\
 | 
			
		||||
	$(DIRECTORY)/include/GL/mesa_wgl.h				\
 | 
			
		||||
	$(DIRECTORY)/include/GL/mglmesa.h				\
 | 
			
		||||
	$(DIRECTORY)/include/GL/osmesa.h				\
 | 
			
		||||
	$(DIRECTORY)/include/GL/svgamesa.h				\
 | 
			
		||||
	$(DIRECTORY)/include/GL/ugl*.h					\
 | 
			
		||||
	$(DIRECTORY)/include/GL/vms_x_fix.h				\
 | 
			
		||||
	$(DIRECTORY)/include/GL/wmesa.h					\
 | 
			
		||||
	$(DIRECTORY)/include/GL/xmesa.h					\
 | 
			
		||||
	$(DIRECTORY)/include/GL/xmesa_x.h				\
 | 
			
		||||
	$(DIRECTORY)/include/GL/xmesa_xf86.h				\
 | 
			
		||||
	$(DIRECTORY)/include/GLView.h					\
 | 
			
		||||
	$(DIRECTORY)/include/dmesadxe.h					\
 | 
			
		||||
	$(DIRECTORY)/include/Makefile.in				\
 | 
			
		||||
	$(DIRECTORY)/include/Makefile.am				\
 | 
			
		||||
	$(DIRECTORY)/src/Makefile*					\
 | 
			
		||||
	$(DIRECTORY)/src/libGL_la_SOURCES				\
 | 
			
		||||
	$(DIRECTORY)/src/descrip.mms					\
 | 
			
		||||
	$(DIRECTORY)/src/mesa.conf					\
 | 
			
		||||
	$(DIRECTORY)/src/*.def						\
 | 
			
		||||
	$(DIRECTORY)/src/depend						\
 | 
			
		||||
	$(DIRECTORY)/src/*.[chS]					\
 | 
			
		||||
	$(DIRECTORY)/src/array_cache/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/src/array_cache/Makefile*				\
 | 
			
		||||
	$(DIRECTORY)/src/array_cache/libMesaAC_la_SOURCES		\
 | 
			
		||||
	$(DIRECTORY)/src/math/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/math/Makefile*					\
 | 
			
		||||
	$(DIRECTORY)/src/swrast/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/swrast/Makefile*				\
 | 
			
		||||
	$(DIRECTORY)/src/swrast/libMesaSwrast_la_SOURCES		\
 | 
			
		||||
	$(DIRECTORY)/src/swrast_setup/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/src/swrast_setup/Makefile*				\
 | 
			
		||||
	$(DIRECTORY)/src/tnl/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/tnl/Makefile*					\
 | 
			
		||||
	$(DIRECTORY)/src/tnl/libMesaTnl_la_SOURCES			\
 | 
			
		||||
	$(DIRECTORY)/src/tnl_dd/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/tnl_dd/imm/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/src/tnl_dd/imm/NOTES.imm				\
 | 
			
		||||
	$(DIRECTORY)/src/windml/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/windml/tornado/*.c				\
 | 
			
		||||
	$(DIRECTORY)/src/windml/tornado/*.cdf				\
 | 
			
		||||
	$(DIRECTORY)/src/windml/man3/*.3				\
 | 
			
		||||
	$(DIRECTORY)/src/windml/man3/*.html				\
 | 
			
		||||
	$(DIRECTORY)/src/DOS/*.[chS]					\
 | 
			
		||||
	$(DIRECTORY)/src/DOS/vesa/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/src/BeOS/*.h					\
 | 
			
		||||
	$(DIRECTORY)/src/BeOS/*.cpp					\
 | 
			
		||||
	$(DIRECTORY)/src/FX/Makefile.am					\
 | 
			
		||||
	$(DIRECTORY)/src/FX/Makefile.in					\
 | 
			
		||||
	$(DIRECTORY)/src/FX/libMesaFX_la_SOURCES			\
 | 
			
		||||
	$(DIRECTORY)/src/FX/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/FX/*.def					\
 | 
			
		||||
	$(DIRECTORY)/src/FX/X86/Makefile.am				\
 | 
			
		||||
	$(DIRECTORY)/src/FX/X86/Makefile.in				\
 | 
			
		||||
	$(DIRECTORY)/src/FX/X86/*.[Shc]					\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/Makefile.am				\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/Makefile.in				\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/ggimesa.conf.in				\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/default/*.c				\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/default/Makefile.am			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/default/Makefile.in			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/default/genkgi.conf.in			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/display/*.c				\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/display/Makefile.am			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/display/Makefile.in			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/display/fbdev.conf.in			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/include/Makefile.am			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/include/Makefile.in			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/include/ggi/Makefile.am			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/include/ggi/Makefile.in			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/include/ggi/mesa/Makefile.am		\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/include/ggi/mesa/Makefile.in		\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/include/ggi/mesa/*.h			\
 | 
			
		||||
	$(DIRECTORY)/src/KNOWN_BUGS					\
 | 
			
		||||
	$(DIRECTORY)/src/OSmesa/Makefile.am				\
 | 
			
		||||
	$(DIRECTORY)/src/OSmesa/Makefile.in				\
 | 
			
		||||
	$(DIRECTORY)/src/OSmesa/Makefile.win				\
 | 
			
		||||
	$(DIRECTORY)/src/OSmesa/osmesa.def				\
 | 
			
		||||
	$(DIRECTORY)/src/OSmesa/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/SPARC/*.[chS]					\
 | 
			
		||||
	$(DIRECTORY)/src/SPARC/Makefile.am				\
 | 
			
		||||
	$(DIRECTORY)/src/SPARC/Makefile.in				\
 | 
			
		||||
	$(DIRECTORY)/src/SVGA/Makefile.am				\
 | 
			
		||||
	$(DIRECTORY)/src/SVGA/Makefile.in				\
 | 
			
		||||
	$(DIRECTORY)/src/SVGA/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/Trace/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/Trace/Makefile.am				\
 | 
			
		||||
	$(DIRECTORY)/src/Trace/Makefile.in				\
 | 
			
		||||
	$(DIRECTORY)/src/Windows/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/Windows/*.def					\
 | 
			
		||||
	$(DIRECTORY)/src/X/Makefile.am					\
 | 
			
		||||
	$(DIRECTORY)/src/X/Makefile.in					\
 | 
			
		||||
	$(DIRECTORY)/src/X/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/X86/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/X86/Makefile.am				\
 | 
			
		||||
	$(DIRECTORY)/src/X86/Makefile.in				\
 | 
			
		||||
	$(DIRECTORY)/src/X86/*.S					\
 | 
			
		||||
	$(DIRECTORY)/si-glu/Makefile.am					\
 | 
			
		||||
	$(DIRECTORY)/si-glu/Makefile.in					\
 | 
			
		||||
	$(DIRECTORY)/si-glu/Makefile.X11				\
 | 
			
		||||
	$(DIRECTORY)/si-glu/Makefile.win				\
 | 
			
		||||
	$(DIRECTORY)/si-glu/glu.def					\
 | 
			
		||||
	$(DIRECTORY)/si-glu/dummy.cc					\
 | 
			
		||||
	$(DIRECTORY)/si-glu/descrip.mms					\
 | 
			
		||||
	$(DIRECTORY)/si-glu/mesaglu.opt					\
 | 
			
		||||
	$(DIRECTORY)/si-glu/include/gluos.h				\
 | 
			
		||||
	$(DIRECTORY)/si-glu/include/Makefile.am				\
 | 
			
		||||
	$(DIRECTORY)/si-glu/include/Makefile.in				\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/Makefile.am			\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/Makefile.in			\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/interface/*.h			\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/interface/*.cc			\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/interface/libNIFac_la_SOURCES	\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/interface/Makefile.am		\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/interface/Makefile.in		\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/internals/*.h			\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/internals/*.cc			\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/internals/libNInt_la_SOURCES	\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/internals/Makefile.am		\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/internals/Makefile.in		\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/nurbtess/*.h			\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/nurbtess/*.cc			\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/nurbtess/libNTess_la_SOURCES	\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/nurbtess/Makefile.am		\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/nurbtess/Makefile.in		\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libtess/README				\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libtess/alg-outline				\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libtess/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libtess/libtess_la_SOURCES			\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libtess/Makefile.am				\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libtess/Makefile.in				\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libutil/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libutil/libutil_la_SOURCES			\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libutil/Makefile.am				\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libutil/Makefile.in				\
 | 
			
		||||
	$(DIRECTORY)/src-glu/README[12]					\
 | 
			
		||||
	$(DIRECTORY)/src-glu/Makefile*					\
 | 
			
		||||
	$(DIRECTORY)/src-glu/descrip.mms				\
 | 
			
		||||
	$(DIRECTORY)/src-glu/mms_depend					\
 | 
			
		||||
	$(DIRECTORY)/src-glu/*.def					\
 | 
			
		||||
	$(DIRECTORY)/src-glu/depend					\
 | 
			
		||||
	$(DIRECTORY)/src-glu/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/ChangeLog				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/INSTALL				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/Makefile.in				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/README				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/TODO					\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/configure				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/configure.in				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/demos/ChangeLog			\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/demos/Cube				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/demos/Ed				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/demos/Makefile.in			\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/demos/Mcube				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/demos/Tea				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/demos/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/demos/events				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/include/GL/ChangeLog			\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/include/GL/*.h			\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/include/GL/Makefile.in		\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/man/ChangeLog				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/man/GL*				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/man/Makefile.in			\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/man/Mesa*				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/src/ChangeLog				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/src/*.c				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/src/Makefile.in			\
 | 
			
		||||
	$(DIRECTORY)/widgets-sgi/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/widgets-sgi/Makefile*				\
 | 
			
		||||
	$(DIRECTORY)/widgets-sgi/README					\
 | 
			
		||||
	$(DIRECTORY)/util/README					\
 | 
			
		||||
	$(DIRECTORY)/util/Makefile.am					\
 | 
			
		||||
	$(DIRECTORY)/util/Makefile.in					\
 | 
			
		||||
	$(DIRECTORY)/util/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/util/sampleMakefile				\
 | 
			
		||||
	$(DIRECTORY)/vms/analyze_map.com				\
 | 
			
		||||
	$(DIRECTORY)/vms/xlib.opt					\
 | 
			
		||||
	$(DIRECTORY)/vms/xlib_share.opt					\
 | 
			
		||||
	$(DIRECTORY)/BeOS/Makefile					\
 | 
			
		||||
	$(DIRECTORY)/BeOS/*.cpp
 | 
			
		||||
 | 
			
		||||
# old stuff
 | 
			
		||||
#	$(DIRECTORY)/Win32			\
 | 
			
		||||
#	$(DIRECTORY)/win32
 | 
			
		||||
OBSOLETE_LIB_FILES = \
 | 
			
		||||
	$(DIRECTORY)/src/Allegro/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*.cpp					\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*.CPP					\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*.h					\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*.H					\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*.c					\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*.C					\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/MAKEFILE					\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*bat					\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*DEF					\
 | 
			
		||||
	$(DIRECTORY)/src/DOS/DEPEND.DOS					\
 | 
			
		||||
	$(DIRECTORY)/src/S3/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/S3/*.def					\
 | 
			
		||||
	$(DIRECTORY)/src/S3/*.mak					\
 | 
			
		||||
	$(DIRECTORY)/src/S3/*.rc					\
 | 
			
		||||
	$(DIRECTORY)/macos/README					\
 | 
			
		||||
	$(DIRECTORY)/macos/gli_api/*.h					\
 | 
			
		||||
	$(DIRECTORY)/macos/cglpane/CGLPane.*				\
 | 
			
		||||
	$(DIRECTORY)/macos/include-mac/*.h				\
 | 
			
		||||
	$(DIRECTORY)/macos/libraries/*.stub				\
 | 
			
		||||
	$(DIRECTORY)/macos/libraries/*Stub				\
 | 
			
		||||
	$(DIRECTORY)/macos/projects/*.mcp				\
 | 
			
		||||
	$(DIRECTORY)/macos/projects/*.exp				\
 | 
			
		||||
	$(DIRECTORY)/macos/projects/*.h					\
 | 
			
		||||
	$(DIRECTORY)/macos/resources/*.c				\
 | 
			
		||||
	$(DIRECTORY)/macos/resources/*.r				\
 | 
			
		||||
	$(DIRECTORY)/macos/resources/*.rsrc				\
 | 
			
		||||
	$(DIRECTORY)/macos/src-agl/*.exp				\
 | 
			
		||||
	$(DIRECTORY)/macos/src-agl/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/macos/src-gli/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/OpenStep
 | 
			
		||||
 | 
			
		||||
#	$(DIRECTORY)/OpenStep			\
 | 
			
		||||
#
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
DEMO_FILES =	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glut.h		\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glutf90.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glut_h.dja	\
 | 
			
		||||
	$(DIRECTORY)/src-glut/Makefile*		\
 | 
			
		||||
	$(DIRECTORY)/src-glut/depend		\
 | 
			
		||||
	$(DIRECTORY)/src-glut/*def		\
 | 
			
		||||
	$(DIRECTORY)/src-glut/descrip.mms	\
 | 
			
		||||
	$(DIRECTORY)/src-glut/mms_depend	\
 | 
			
		||||
	$(DIRECTORY)/src-glut/*.[ch]		\
 | 
			
		||||
	$(DIRECTORY)/src-glut.dja/*		\
 | 
			
		||||
	$(DIRECTORY)/src-glut.beos/Makefile	\
 | 
			
		||||
	$(DIRECTORY)/src-glut.beos/*.cpp	\
 | 
			
		||||
	$(DIRECTORY)/src-glut.beos/*.h		\
 | 
			
		||||
	$(DIRECTORY)/src-glut.dos/*.[ch]	\
 | 
			
		||||
	$(DIRECTORY)/src-glut.dos/Makefile.DJ	\
 | 
			
		||||
	$(DIRECTORY)/src-glut.dos/PC_HW/*.[chS]	\
 | 
			
		||||
	$(DIRECTORY)/images/*			\
 | 
			
		||||
	$(DIRECTORY)/demos/Makefile*		\
 | 
			
		||||
	$(DIRECTORY)/demos/descrip.mms		\
 | 
			
		||||
	$(DIRECTORY)/demos/*.[ch]		\
 | 
			
		||||
	$(DIRECTORY)/demos/*.cxx		\
 | 
			
		||||
	$(DIRECTORY)/demos/*.dat		\
 | 
			
		||||
	$(DIRECTORY)/demos/README		\
 | 
			
		||||
	$(DIRECTORY)/xdemos/Makefile*		\
 | 
			
		||||
	$(DIRECTORY)/xdemos/descrip.mms		\
 | 
			
		||||
	$(DIRECTORY)/xdemos/*.[cf]		\
 | 
			
		||||
@@ -509,13 +634,84 @@ DEMO_FILES =	\
 | 
			
		||||
	$(DIRECTORY)/samples/Makefile*		\
 | 
			
		||||
	$(DIRECTORY)/samples/README		\
 | 
			
		||||
	$(DIRECTORY)/samples/*.c		\
 | 
			
		||||
	$(DIRECTORY)/samples/*.dja		\
 | 
			
		||||
	$(DIRECTORY)/3Dfx			\
 | 
			
		||||
	$(DIRECTORY)/mtdemos			\
 | 
			
		||||
	$(DIRECTORY)/windmldemos/Makefile.ugl	\
 | 
			
		||||
	$(DIRECTORY)/windmldemos/*.c		\
 | 
			
		||||
	$(DIRECTORY)/windmldemos/*.bmp		\
 | 
			
		||||
	$(DIRECTORY)/ggi
 | 
			
		||||
 | 
			
		||||
OBSOLETE_DEMO_FILES = \
 | 
			
		||||
	$(DIRECTORY)/include/GL/glut_h.dja	\
 | 
			
		||||
	$(DIRECTORY)/src-glut.dja/*		\
 | 
			
		||||
	$(DIRECTORY)/src-glut.beos/Makefile	\
 | 
			
		||||
	$(DIRECTORY)/src-glut.beos/*.cpp	\
 | 
			
		||||
	$(DIRECTORY)/src-glut.beos/*.h		\
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
SI_GLU_FILES = \
 | 
			
		||||
	$(DIRECTORY)/Makefile*				\
 | 
			
		||||
	$(DIRECTORY)/Make-config			\
 | 
			
		||||
	$(DIRECTORY)/bin/mklib*				\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glu.h			\
 | 
			
		||||
	$(DIRECTORY)/si-glu/Makefile.X11		\
 | 
			
		||||
	$(DIRECTORY)/si-glu/include/gluos.h		\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/interface/*.h	\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/interface/*.cc	\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/internals/*.h	\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/internals/*.cc	\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/nurbstess/*.h	\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/nurbstess/*.cc	\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libtess/README		\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libtess/alg-outline		\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libtess/*.[ch]		\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libutil/*.[ch]
 | 
			
		||||
 | 
			
		||||
GLU_FILES = \
 | 
			
		||||
	$(DIRECTORY)/Makefile*			\
 | 
			
		||||
	$(DIRECTORY)/Make-config		\
 | 
			
		||||
	$(DIRECTORY)/bin/mklib*			\
 | 
			
		||||
	$(DIRECTORY)/include/GL/gl.h		\
 | 
			
		||||
	$(DIRECTORY)/include/GL/gl_mangle.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glext.h		\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glu.h		\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glu_mangle.h	\
 | 
			
		||||
	$(DIRECTORY)/src-glu/README[12]		\
 | 
			
		||||
	$(DIRECTORY)/src-glu/Makefile*		\
 | 
			
		||||
	$(DIRECTORY)/src-glu/descrip.mms	\
 | 
			
		||||
	$(DIRECTORY)/src-glu/mms_depend		\
 | 
			
		||||
	$(DIRECTORY)/src-glu/*.def		\
 | 
			
		||||
	$(DIRECTORY)/src-glu/depend		\
 | 
			
		||||
	$(DIRECTORY)/src-glu/*.[ch]
 | 
			
		||||
 | 
			
		||||
GLUT_FILES = \
 | 
			
		||||
	$(DIRECTORY)/Makefile*			\
 | 
			
		||||
	$(DIRECTORY)/Make-config		\
 | 
			
		||||
	$(DIRECTORY)/bin/mklib*			\
 | 
			
		||||
	$(DIRECTORY)/include/GL/gl.h		\
 | 
			
		||||
	$(DIRECTORY)/include/GL/gl_mangle.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glext.h		\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glu.h		\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glu_mangle.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glut.h		\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glutf90.h	\
 | 
			
		||||
	$(DIRECTORY)/src-glut/Makefile*		\
 | 
			
		||||
	$(DIRECTORY)/src-glut/depend		\
 | 
			
		||||
	$(DIRECTORY)/src-glut/*def		\
 | 
			
		||||
	$(DIRECTORY)/src-glut/descrip.mms	\
 | 
			
		||||
	$(DIRECTORY)/src-glut/mms_depend	\
 | 
			
		||||
	$(DIRECTORY)/src-glut/*.[ch]
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
OBSOLETE_GLUT_FILES = \
 | 
			
		||||
	$(DIRECTORY)/include/GL/glut_h.dja	\
 | 
			
		||||
	$(DIRECTORY)/src-glut.dja/*		\
 | 
			
		||||
	$(DIRECTORY)/src-glut.beos/Makefile	\
 | 
			
		||||
	$(DIRECTORY)/src-glut.beos/*.cpp	\
 | 
			
		||||
	$(DIRECTORY)/src-glut.beos/*.h
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
lib_tar:
 | 
			
		||||
	cp Makefile.X11 Makefile ; \
 | 
			
		||||
	cd .. ; \
 | 
			
		||||
	tar -cvf $(LIB_NAME).tar $(LIB_FILES) ; \
 | 
			
		||||
	gzip $(LIB_NAME).tar ; \
 | 
			
		||||
@@ -527,14 +723,30 @@ demo_tar:
 | 
			
		||||
	gzip $(DEMO_NAME).tar ; \
 | 
			
		||||
	mv $(DEMO_NAME).tar.gz $(DIRECTORY)
 | 
			
		||||
 | 
			
		||||
glu_tar:
 | 
			
		||||
	cp Makefile.X11 Makefile ; \
 | 
			
		||||
	cd .. ; \
 | 
			
		||||
	tar -cvf $(GLU_NAME).tar $(GLU_FILES) ; \
 | 
			
		||||
	gzip $(GLU_NAME).tar ; \
 | 
			
		||||
	mv $(GLU_NAME).tar.gz $(DIRECTORY)
 | 
			
		||||
 | 
			
		||||
glut_tar:
 | 
			
		||||
	cp Makefile.X11 Makefile ; \
 | 
			
		||||
	cd .. ; \
 | 
			
		||||
	tar -cvf $(GLUT_NAME).tar $(GLUT_FILES) ; \
 | 
			
		||||
	gzip $(GLUT_NAME).tar ; \
 | 
			
		||||
	mv $(GLUT_NAME).tar.gz $(DIRECTORY)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
lib_zip:
 | 
			
		||||
	-rm $(LIB_NAME).zip
 | 
			
		||||
	-rm $(LIB_NAME).zip ; \
 | 
			
		||||
	cp Makefile.X11 Makefile ; \
 | 
			
		||||
	cd .. ; \
 | 
			
		||||
	zip -r $(LIB_NAME).zip $(LIB_FILES) ; \
 | 
			
		||||
	mv $(LIB_NAME).zip $(DIRECTORY)
 | 
			
		||||
 | 
			
		||||
demo_zip:
 | 
			
		||||
	-rm $(DEMO_NAME).zip
 | 
			
		||||
	-rm $(DEMO_NAME).zip ; \
 | 
			
		||||
	cd .. ; \
 | 
			
		||||
	zip -r $(DEMO_NAME).zip $(DEMO_FILES) ; \
 | 
			
		||||
	mv $(DEMO_NAME).zip $(DIRECTORY)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										94
									
								
								docs/MESA_agp_offset.spec
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										94
									
								
								docs/MESA_agp_offset.spec
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,94 @@
 | 
			
		||||
Name
 | 
			
		||||
 | 
			
		||||
    MESA_agp_offset
 | 
			
		||||
 | 
			
		||||
Name Strings
 | 
			
		||||
 | 
			
		||||
    GLX_MESA_agp_offset
 | 
			
		||||
 | 
			
		||||
Contact
 | 
			
		||||
 | 
			
		||||
    Brian Paul, Tungsten Graphics, Inc. (brian 'at' tungstengraphics.com)
 | 
			
		||||
    Keith Whitwell, Tungsten Graphics, Inc.  (keith 'at' tungstengraphics.com)
 | 
			
		||||
 | 
			
		||||
Status
 | 
			
		||||
 | 
			
		||||
    Shipping (Mesa 4.0.4 and later.  Only implemented in particular
 | 
			
		||||
    XFree86/DRI drivers.)
 | 
			
		||||
 | 
			
		||||
Version
 | 
			
		||||
 | 
			
		||||
    1.0
 | 
			
		||||
 | 
			
		||||
Number
 | 
			
		||||
 | 
			
		||||
    TBD
 | 
			
		||||
 | 
			
		||||
Dependencies
 | 
			
		||||
 | 
			
		||||
    OpenGL 1.0 or later is required
 | 
			
		||||
    GLX_NV_vertex_array_range is required.
 | 
			
		||||
    This extensions is written against the OpenGL 1.4 Specification.
 | 
			
		||||
 | 
			
		||||
Overview
 | 
			
		||||
 | 
			
		||||
    This extensions provides a way to convert pointers in an AGP memory
 | 
			
		||||
    region into byte offsets into the AGP aperture.
 | 
			
		||||
    Note, this extension depends on GLX_NV_vertex_array_range, for which
 | 
			
		||||
    no real specification exists.  See GL_NV_vertex_array_range for more
 | 
			
		||||
    information.
 | 
			
		||||
 | 
			
		||||
IP Status
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Issues
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
New Procedures and Functions
 | 
			
		||||
 | 
			
		||||
    GLuint glXGetAGPOffsetMESA( const GLvoid *pointer )
 | 
			
		||||
 | 
			
		||||
New Tokens
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to the OpenGL 1.4 Specification
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 3 the GLX 1.4 Specification (Functions and Errors)
 | 
			
		||||
 | 
			
		||||
    Add a new section, 3.6 as follows:
 | 
			
		||||
 | 
			
		||||
    3.6 AGP Memory Access
 | 
			
		||||
 | 
			
		||||
    On "PC" computers, AGP memory can be allocated with glXAllocateMemoryNV
 | 
			
		||||
    and freed with glXFreeMemoryNV.  Sometimes it's useful to know where a
 | 
			
		||||
    block of AGP memory is located with respect to the start of the AGP
 | 
			
		||||
    aperature.  The function
 | 
			
		||||
 | 
			
		||||
        GLuint glXGetAGPOffsetMESA( const GLvoid *pointer )
 | 
			
		||||
 | 
			
		||||
    Returns the offset of the given memory block from the start of AGP
 | 
			
		||||
    memory in basic machine units (i.e. bytes).  If pointer is invalid
 | 
			
		||||
    the value ~0 will be returned.
 | 
			
		||||
 | 
			
		||||
GLX Protocol
 | 
			
		||||
 | 
			
		||||
    None.  This is a client side-only extension.
 | 
			
		||||
 | 
			
		||||
Errors
 | 
			
		||||
 | 
			
		||||
    glXGetAGPOffsetMESA will return ~0 if the pointer does not point to
 | 
			
		||||
    an AGP memory region.
 | 
			
		||||
 | 
			
		||||
New State
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Revision History
 | 
			
		||||
 | 
			
		||||
    20 September 2002 - Initial draft
 | 
			
		||||
    2 October 2002 - finished GLX chapter 3 additions
 | 
			
		||||
							
								
								
									
										88
									
								
								docs/MESA_copy_sub_buffer.spec
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										88
									
								
								docs/MESA_copy_sub_buffer.spec
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,88 @@
 | 
			
		||||
Name
 | 
			
		||||
 | 
			
		||||
    MESA_copy_sub_buffer
 | 
			
		||||
 | 
			
		||||
Name Strings
 | 
			
		||||
 | 
			
		||||
    GLX_MESA_copy_sub_buffer
 | 
			
		||||
 | 
			
		||||
Contact
 | 
			
		||||
 | 
			
		||||
    Brian Paul (brian 'at' mesa3d.org)
 | 
			
		||||
 | 
			
		||||
Status
 | 
			
		||||
 | 
			
		||||
    Shipping since Mesa 2.6 in February, 1998.
 | 
			
		||||
 | 
			
		||||
Version
 | 
			
		||||
 | 
			
		||||
    Last Modified Date:  8 June 2000
 | 
			
		||||
 | 
			
		||||
Number
 | 
			
		||||
 | 
			
		||||
    215
 | 
			
		||||
 | 
			
		||||
Dependencies
 | 
			
		||||
 | 
			
		||||
    OpenGL 1.0 or later is required.
 | 
			
		||||
    GLX 1.0 or later is required.
 | 
			
		||||
 | 
			
		||||
Overview
 | 
			
		||||
 | 
			
		||||
    The glxCopySubBufferMESA() function copies a rectangular region
 | 
			
		||||
    of the back color buffer to the front color buffer.  This can be
 | 
			
		||||
    used to quickly repaint 3D windows in response to expose events
 | 
			
		||||
    when the back color buffer cannot be damaged by other windows.
 | 
			
		||||
 | 
			
		||||
IP Status
 | 
			
		||||
 | 
			
		||||
    Open-source; freely implementable.
 | 
			
		||||
 | 
			
		||||
Issues
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
New Procedures and Functions
 | 
			
		||||
 | 
			
		||||
    void glXCopySubBufferMESA( Display *dpy, GLXDrawable drawable,
 | 
			
		||||
			       int x, int y, int width, int height );
 | 
			
		||||
 | 
			
		||||
New Tokens
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 3 of the GLX 1.3 Specification (Functions and Errors)
 | 
			
		||||
 | 
			
		||||
    Add to section 3.3.10 Double Buffering:
 | 
			
		||||
 | 
			
		||||
    The function
 | 
			
		||||
 | 
			
		||||
	 void glXCopySubBufferMESA( Display *dpy, GLXDrawable drawable,
 | 
			
		||||
				    int x, int y, int width, int height );
 | 
			
		||||
 | 
			
		||||
    may be used to copy a rectangular region of the back color buffer to
 | 
			
		||||
    the front color buffer.  This can be used to quickly repaint 3D windows
 | 
			
		||||
    in response to expose events when the back color buffer cannot be
 | 
			
		||||
    damaged by other windows.
 | 
			
		||||
 | 
			
		||||
    <x> and <y> indicates the lower-left corner of the region to copy and
 | 
			
		||||
    <width> and <height> indicate the size in pixels.  Coordinate (0,0)
 | 
			
		||||
    corresponds to the lower-left pixel of the window, like glReadPixels.
 | 
			
		||||
 | 
			
		||||
GLX Protocol
 | 
			
		||||
 | 
			
		||||
    None at this time.  The extension is implemented in terms of ordinary
 | 
			
		||||
    Xlib protocol inside of Mesa.
 | 
			
		||||
 | 
			
		||||
Errors
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
New State
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
Revision History
 | 
			
		||||
 | 
			
		||||
    8 June 2000 - initial specification
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										138
									
								
								docs/MESA_pack_invert.spec
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										138
									
								
								docs/MESA_pack_invert.spec
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,138 @@
 | 
			
		||||
Name
 | 
			
		||||
 | 
			
		||||
    MESA_pack_invert
 | 
			
		||||
 | 
			
		||||
Name Strings
 | 
			
		||||
 | 
			
		||||
    GL_MESA_pack_invert
 | 
			
		||||
 | 
			
		||||
Contact
 | 
			
		||||
 | 
			
		||||
    Brian Paul, Tungsten Graphics, Inc. (brian 'at' tungstengraphics.com)
 | 
			
		||||
    Keith Whitwell, Tungsten Graphics, Inc.  (keith 'at' tungstengraphics.com)
 | 
			
		||||
 | 
			
		||||
Status
 | 
			
		||||
 | 
			
		||||
    Shipping (Mesa 4.0.4 and later)
 | 
			
		||||
 | 
			
		||||
Version
 | 
			
		||||
 | 
			
		||||
    1.0
 | 
			
		||||
 | 
			
		||||
Number
 | 
			
		||||
 | 
			
		||||
    TBD
 | 
			
		||||
 | 
			
		||||
Dependencies
 | 
			
		||||
 | 
			
		||||
    OpenGL 1.0 or later is required
 | 
			
		||||
    This extensions is written against the OpenGL 1.4 Specification.
 | 
			
		||||
 | 
			
		||||
Overview
 | 
			
		||||
 | 
			
		||||
    This extension adds a new pixel storage parameter to indicate that
 | 
			
		||||
    images are to be packed in top-to-bottom order instead of OpenGL's
 | 
			
		||||
    conventional bottom-to-top order.  Only pixel packing can be
 | 
			
		||||
    inverted (i.e. for glReadPixels, glGetTexImage, glGetConvolutionFilter,
 | 
			
		||||
    etc).
 | 
			
		||||
 | 
			
		||||
    Almost all known image file formats store images in top-to-bottom
 | 
			
		||||
    order.  As it is, OpenGL reads images from the frame buffer in
 | 
			
		||||
    bottom-to-top order.  Thus, images usually have to be inverted before
 | 
			
		||||
    writing them to a file with image I/O libraries.  This extension
 | 
			
		||||
    allows images to be read such that inverting isn't needed.
 | 
			
		||||
 | 
			
		||||
IP Status
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Issues
 | 
			
		||||
 | 
			
		||||
    1. Should we also defined UNPACK_INVERT_MESA for glDrawPixels, etc?
 | 
			
		||||
 | 
			
		||||
    Resolved:  No, we're only concerned with pixel packing.  There are other
 | 
			
		||||
    solutions for inverting images when using glDrawPixels (negative Y pixel
 | 
			
		||||
    zoom) or glTexImage (invert the vertex T coordinates).  It would be easy
 | 
			
		||||
    enough to define a complementary extension for pixel packing in the
 | 
			
		||||
    future if needed.
 | 
			
		||||
 | 
			
		||||
New Procedures and Functions
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
New Tokens
 | 
			
		||||
 | 
			
		||||
    Accepted by the <pname> parameter of PixelStorei and PixelStoref
 | 
			
		||||
    and the <pname> parameter of GetIntegerv, GetFloatv, GetDoublev
 | 
			
		||||
    and GetBooleanv:
 | 
			
		||||
 | 
			
		||||
        PACK_INVERT_MESA                   0x8758
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 2 of the OpenGL 1.4 Specification (OpenGL Operation)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 3 of the OpenGL 1.4 Specification (Rasterization)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 4 of the OpenGL 1.4 Specification (Per-Fragment
 | 
			
		||||
Operations and the Frame Buffer)
 | 
			
		||||
 | 
			
		||||
    Add the following entry to table 4.4 (PixelStore parameters) on page 182:
 | 
			
		||||
 | 
			
		||||
    Parameter Name       Type    Initial Value    Valid Range
 | 
			
		||||
    ---------------------------------------------------------
 | 
			
		||||
    PACK_INVERT_MESA     boolean     FALSE        TRUE/FALSE
 | 
			
		||||
 | 
			
		||||
    In the section labeled "Placement in Client Memory" on page 184
 | 
			
		||||
    insert the following text into the paragraph before the sentence
 | 
			
		||||
    that starts with "If the format is RED, GREEN, BLUE...":
 | 
			
		||||
 | 
			
		||||
    "The parameter PACK_INVERT_MESA controls whether the image is packed
 | 
			
		||||
     in bottom-to-top order (the default) or top-to-bottom order.  Equation
 | 
			
		||||
     3.8 is modified as follows:
 | 
			
		||||
 | 
			
		||||
     ... the first element of the Nth row is indicated by
 | 
			
		||||
 | 
			
		||||
         p + Nk,                if PACK_INVERT_MESA is false
 | 
			
		||||
         p + k * (H - 1) - Nk,  if PACK_INVERT_MESA is true, where H is the
 | 
			
		||||
                                image height
 | 
			
		||||
    "
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 5 of the OpenGL 1.4 Specification (Special Functions)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 6 of the OpenGL 1.4 Specification (State and
 | 
			
		||||
State Requests)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to Appendix A of the OpenGL 1.4 Specification (Invariance)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to the AGL/GLX/WGL Specifications
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
GLX Protocol
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Errors
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
New State
 | 
			
		||||
 | 
			
		||||
    Add the following entry to table 6.20 (Pixels) on page 235:
 | 
			
		||||
 | 
			
		||||
    Get Value         Type     Get Cmd    Initial Value  Description                Sec    Attribute
 | 
			
		||||
    --------------------------------------------------------------------------------------------------
 | 
			
		||||
    PACK_INVERT_MESA  boolean  GetBoolean  FALSE         Value of PACK_INVERT_MESA  4.3.2  pixel-store
 | 
			
		||||
 | 
			
		||||
Revision History
 | 
			
		||||
 | 
			
		||||
    21 September 2002 - Initial draft
 | 
			
		||||
							
								
								
									
										233
									
								
								docs/MESA_packed_depth_stencil.spec
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										233
									
								
								docs/MESA_packed_depth_stencil.spec
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,233 @@
 | 
			
		||||
XXX - Not complete yet!!!
 | 
			
		||||
 | 
			
		||||
Name
 | 
			
		||||
 | 
			
		||||
    MESA_packed_depth_stencil
 | 
			
		||||
 | 
			
		||||
Name Strings
 | 
			
		||||
 | 
			
		||||
    GL_MESA_packed_depth_stencil
 | 
			
		||||
 | 
			
		||||
Contact
 | 
			
		||||
 | 
			
		||||
    Keith Whitwell, VA Linux Systems Inc. (keithw 'at' valinux.com)
 | 
			
		||||
    Brian Paul, VA Linux Systems Inc. (brianp 'at' valinux.com)
 | 
			
		||||
 | 
			
		||||
Status
 | 
			
		||||
 | 
			
		||||
    OBSOLETE - NEVER SHIPPED (use GL_NV_packed_depth_stencil)
 | 
			
		||||
 | 
			
		||||
Version
 | 
			
		||||
 | 
			
		||||
    $Id: MESA_packed_depth_stencil.spec,v 1.1.2.1 2002/09/20 19:14:11 brianp Exp $
 | 
			
		||||
 | 
			
		||||
Number
 | 
			
		||||
 | 
			
		||||
    ???
 | 
			
		||||
 | 
			
		||||
Dependencies
 | 
			
		||||
 | 
			
		||||
    EXT_abgr affects the definition of this extension
 | 
			
		||||
    SGIS_texture4D affects the definition of this extension
 | 
			
		||||
    EXT_cmyka affects the definition of this extension
 | 
			
		||||
    ARB_packed_pixels affects the definition of this extension
 | 
			
		||||
 | 
			
		||||
Overview
 | 
			
		||||
	
 | 
			
		||||
    Provides a mechanism for DrawPixels and ReadPixels to efficiently
 | 
			
		||||
    transfer depth and stencil image data.  Specifically, we defined new
 | 
			
		||||
    packed pixel formats and types which pack both stencil and depth
 | 
			
		||||
    into one value.
 | 
			
		||||
 | 
			
		||||
Issues:
 | 
			
		||||
 | 
			
		||||
    1. Is this the right way to distinguish between 24/8 and 8/24
 | 
			
		||||
       pixel formats?  Should we instead provide both:
 | 
			
		||||
	
 | 
			
		||||
       GL_DEPTH_STENCIL_MESA
 | 
			
		||||
       GL_STENCIL_DEPTH_MESA
 | 
			
		||||
 | 
			
		||||
       And perhaps just use GL_UNSIGNED_INT, GL_UNSIGNED_SHORT ?
 | 
			
		||||
 | 
			
		||||
    2. If not, is it correct to use _REV to indicate that stencil
 | 
			
		||||
       preceeds depth in the 1_15 and 8_24 formats?
 | 
			
		||||
 | 
			
		||||
    3. Do we really want the GL_UNSIGNED_SHORT formats?  
 | 
			
		||||
 | 
			
		||||
	
 | 
			
		||||
New Procedures and Functions
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
New Tokens
 | 
			
		||||
    
 | 
			
		||||
    Accepted by the <format> parameter of ReadPixels and DrawPixels:
 | 
			
		||||
 | 
			
		||||
	GL_DEPTH_STENCIL_MESA		0x8750
 | 
			
		||||
 | 
			
		||||
    Accepted by the <type> parameter of ReadPixels and DrawPixels:
 | 
			
		||||
 | 
			
		||||
	GL_UNSIGNED_INT_24_8_MESA	0x8751
 | 
			
		||||
	GL_UNSIGNED_INT_8_24_REV_MESA	0x8752
 | 
			
		||||
	GL_UNSIGNED_SHORT_15_1_MESA	0x8753
 | 
			
		||||
	GL_UNSIGNED_SHORT_1_15_REV_MESA	0x8754
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 2 of the 1.1 Specification (OpenGL Operation)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 3 of the 1.1 Specification (Rasterization)
 | 
			
		||||
 | 
			
		||||
    One entry is added to table 3.5 (DrawPixels and ReadPixels formats).
 | 
			
		||||
    The new table is:
 | 
			
		||||
 | 
			
		||||
			Target
 | 
			
		||||
	Format Name	Buffer	Element Meaning and Order
 | 
			
		||||
	-----------	------	-------------------------
 | 
			
		||||
	COLOR_INDEX	Color	Color index
 | 
			
		||||
	STENCIL_INDEX	Stencil Stencil index
 | 
			
		||||
	DEPTH_COMPONENT Depth	Depth component
 | 
			
		||||
	RED		Color	R component
 | 
			
		||||
	GREEN		Color	G component
 | 
			
		||||
	BLUE		Color	B component
 | 
			
		||||
	ALPHA		Color	A component
 | 
			
		||||
	RGB		Color	R, G, B components
 | 
			
		||||
	RGBA		Color	R, G, B, A components
 | 
			
		||||
	BGRA	        Color   B, G, R, A components
 | 
			
		||||
	ABGR_EXT	Color	A, B, G, R components
 | 
			
		||||
	CMYK_EXT	Color	Cyan, Magenta, Yellow, Black components
 | 
			
		||||
	CMYKA_EXT	Color	Cyan, Magenta, Yellow, Black, A components
 | 
			
		||||
	LUMINANCE	Color	Luminance component
 | 
			
		||||
	LUMINANCE_ALPHA Color	Luminance, A components
 | 
			
		||||
	DEPTH_STENCIL   Depth,  Depth component, stencil index.
 | 
			
		||||
			Stencil
 | 
			
		||||
 | 
			
		||||
	Table 3.5: DrawPixels and ReadPixels formats.  The third column
 | 
			
		||||
	gives a description of and the number and order of elements in a
 | 
			
		||||
	group.
 | 
			
		||||
 | 
			
		||||
    Add to the description of packed pixel formats:
 | 
			
		||||
 | 
			
		||||
	<type> Parameter		Data	of	  Matching
 | 
			
		||||
	Token Name			Type	Elements  Pixel Formats
 | 
			
		||||
	----------------		----	--------  -------------
 | 
			
		||||
 | 
			
		||||
	UNSIGNED_BYTE_3_3_2	      ubyte   3	      RGB
 | 
			
		||||
	UNSIGNED_BYTE_2_3_3_REV       ubyte   3	      RGB
 | 
			
		||||
	UNSIGNED_SHORT_5_6_5	      ushort  3	      RGB
 | 
			
		||||
	UNSIGNED_SHORT_5_6_5_REV      ushort  3	      RGB
 | 
			
		||||
	UNSIGNED_SHORT_4_4_4_4	      ushort  4	      RGBA,BGRA,ABGR_EXT,CMYK_EXT
 | 
			
		||||
	UNSIGNED_SHORT_4_4_4_4_REV    ushort  4	      RGBA,BGRA
 | 
			
		||||
	UNSIGNED_SHORT_5_5_5_1	      ushort  4	      RGBA,BGRA,ABGR_EXT,CMYK_EXT
 | 
			
		||||
	UNSIGNED_SHORT_1_5_5_5_REV    ushort  4	      RGBA,BGRA
 | 
			
		||||
	UNSIGNED_INT_8_8_8_8	      uint    4	      RGBA,BGRA,ABGR_EXT,CMYK_EXT
 | 
			
		||||
	UNSIGNED_INT_8_8_8_8_REV      uint    4	      RGBA,BGRA
 | 
			
		||||
	UNSIGNED_INT_10_10_10_2       uint    4	      RGBA,BGRA,ABGR_EXT,CMYK_EXT
 | 
			
		||||
	UNSIGNED_INT_2_10_10_10_REV   uint    4	      RGBA,BGRA
 | 
			
		||||
	UNSIGNED_SHORT_15_1_MESA      ushort  2       DEPTH_STENCIL_MESA
 | 
			
		||||
	UNSIGNED_SHORT_1_15_REV_MESA  ushort  2       DEPTH_STENCIL_MESA
 | 
			
		||||
	UNSIGNED_SHORT_24_8_MESA      ushort  2       DEPTH_STENCIL_MESA
 | 
			
		||||
	UNSIGNED_SHORT_8_24_REV_MESA  ushort  2       DEPTH_STENCIL_MESA
 | 
			
		||||
 | 
			
		||||
	UNSIGNED_INT_8_24:
 | 
			
		||||
 | 
			
		||||
	     31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10	9  8  7  6  5  4  3  2	1  0
 | 
			
		||||
	    +-----------------------+-----------------------------------------------------------------------+
 | 
			
		||||
	    |			    |			     			    			    |
 | 
			
		||||
	    +-----------------------+-----------------------------------------------------------------------+
 | 
			
		||||
 | 
			
		||||
		    first					second		    
 | 
			
		||||
		    element					element		    
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	UNSIGNED_INT_24_8:
 | 
			
		||||
 | 
			
		||||
	     31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10	9  8  7  6  5  4  3  2	1  0
 | 
			
		||||
	    +----------------------------------------------------------------------+------------------------+
 | 
			
		||||
	    |			    			     			   | 			    |
 | 
			
		||||
	    +----------------------------------------------------------------------+------------------------+
 | 
			
		||||
 | 
			
		||||
		    first								  second		    
 | 
			
		||||
		    element								  element		    
 | 
			
		||||
 | 
			
		||||
	UNSIGNED_SHORT_15_1:
 | 
			
		||||
 | 
			
		||||
	      15  14  13  12  11  10  9   8   7   6   5   4   3   2   1   0
 | 
			
		||||
	    +-----------------------------------------------------------+---+
 | 
			
		||||
	    |					    			|   |
 | 
			
		||||
	    +-----------------------------------------------------------+---+
 | 
			
		||||
 | 
			
		||||
	    		first						second	
 | 
			
		||||
			element						element	
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	UNSIGNED_SHORT_1_15_REV:
 | 
			
		||||
 | 
			
		||||
	      15  14  13  12  11  10  9   8   7   6   5   4   3   2   1   0
 | 
			
		||||
	    +---+-----------------------------------------------------------+
 | 
			
		||||
	    |	|		     					    |
 | 
			
		||||
	    +---+-----------------------------------------------------------+
 | 
			
		||||
 | 
			
		||||
	    second		    first
 | 
			
		||||
	    element		    element
 | 
			
		||||
 | 
			
		||||
    The assignment of elements to fields in the packed pixel is as
 | 
			
		||||
    described in the table below:
 | 
			
		||||
 | 
			
		||||
			   First       Second	Third	    Fourth
 | 
			
		||||
	Format		   Element     Element	Element     Element
 | 
			
		||||
	------		   -------     -------	-------     -------
 | 
			
		||||
	RGB		   red	       green	blue
 | 
			
		||||
	RGBA		   red	       green	blue	    alpha
 | 
			
		||||
	BGRA		   blue	       green	red	    alpha
 | 
			
		||||
	ABGR_EXT	   alpha       blue	green	    red
 | 
			
		||||
	CMYK_EXT	   cyan	       magenta	yellow	    black
 | 
			
		||||
	DEPTH_STENCIL_MESA depth       stencil
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations
 | 
			
		||||
and the Frame Buffer)
 | 
			
		||||
 | 
			
		||||
    The new format is added to the discussion of Obtaining Pixels from the
 | 
			
		||||
    Framebuffer.  It should read " If the <format> is one of RED, GREEN,
 | 
			
		||||
    BLUE, ALPHA, RGB, RGBA, ABGR_EXT, LUMINANCE, or LUMINANCE_ALPHA, and
 | 
			
		||||
    the GL is in color index mode, then the color index is obtained."
 | 
			
		||||
 | 
			
		||||
    The new format is added to the discussion of Index Lookup.  It should
 | 
			
		||||
    read "If <format> is one of RED, GREEN, BLUE, ALPHA, RGB, RGBA,
 | 
			
		||||
    ABGR_EXT, LUMINANCE, or LUMINANCE_ALPHA, then the index is used to
 | 
			
		||||
    reference 4 tables of color components: PIXEL_MAP_I_TO_R,
 | 
			
		||||
    PIXEL_MAP_I_TO_G, PIXEL_MAP_I_TO_B, and PIXEL_MAP_I_TO_A."
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 5 of the 1.1 Specification (Special Functions)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 6 of the 1.1 Specification (State and State Requests)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to the GLX Specification
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
GLX Protocol
 | 
			
		||||
 | 
			
		||||
    TBD
 | 
			
		||||
 | 
			
		||||
Errors
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
New State
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Revision History
 | 
			
		||||
 | 
			
		||||
    Version 1.0 - 23 Sep 2000
 | 
			
		||||
        Keith's original version.
 | 
			
		||||
 | 
			
		||||
    Version 1.1 - 3 Nov 2000
 | 
			
		||||
        Brian's edits, assigned values to new enums.
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										90
									
								
								docs/MESA_pixmap_colormap.spec
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										90
									
								
								docs/MESA_pixmap_colormap.spec
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,90 @@
 | 
			
		||||
Name
 | 
			
		||||
 | 
			
		||||
    MESA_pixmap_colormap
 | 
			
		||||
 | 
			
		||||
Name Strings
 | 
			
		||||
 | 
			
		||||
    GLX_MESA_pixmap_colormap
 | 
			
		||||
 | 
			
		||||
Contact
 | 
			
		||||
 | 
			
		||||
    Brian Paul (brian 'at' mesa3d.org)
 | 
			
		||||
 | 
			
		||||
Status
 | 
			
		||||
 | 
			
		||||
    Shipping since Mesa 1.2.8 in May, 1996.
 | 
			
		||||
 | 
			
		||||
Version
 | 
			
		||||
 | 
			
		||||
    Last Modified Date:  8 June 2000
 | 
			
		||||
 | 
			
		||||
Number
 | 
			
		||||
 | 
			
		||||
    216
 | 
			
		||||
 | 
			
		||||
Dependencies
 | 
			
		||||
 | 
			
		||||
    OpenGL 1.0 or later is required.
 | 
			
		||||
    GLX 1.0 or later is required.
 | 
			
		||||
 | 
			
		||||
Overview
 | 
			
		||||
 | 
			
		||||
    Since Mesa allows RGB rendering into drawables with PseudoColor,
 | 
			
		||||
    StaticColor, GrayScale and StaticGray visuals, Mesa needs a colormap
 | 
			
		||||
    in order to compute pixel values during rendering.
 | 
			
		||||
 | 
			
		||||
    The colormap associated with a window can be queried with normal
 | 
			
		||||
    Xlib functions but there is no colormap associated with pixmaps.
 | 
			
		||||
 | 
			
		||||
    The glXCreateGLXPixmapMESA function is an alternative to glXCreateGLXPixmap
 | 
			
		||||
    which allows specification of a colormap.
 | 
			
		||||
 | 
			
		||||
IP Status
 | 
			
		||||
 | 
			
		||||
    Open-source; freely implementable.
 | 
			
		||||
 | 
			
		||||
Issues
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
New Procedures and Functions
 | 
			
		||||
 | 
			
		||||
    GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual,
 | 
			
		||||
				      Pixmap pixmap, Colormap cmap );
 | 
			
		||||
 | 
			
		||||
New Tokens
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 3 of the GLX 1.3 Specification (Functions and Errors)
 | 
			
		||||
 | 
			
		||||
    Add to section 3.4.2 Off Screen Rendering
 | 
			
		||||
 | 
			
		||||
    The Mesa implementation of GLX allows RGB rendering into X windows and
 | 
			
		||||
    pixmaps of any visual class, not just TrueColor or DirectColor.  In order
 | 
			
		||||
    to compute pixel values from RGB values Mesa requires a colormap.
 | 
			
		||||
 | 
			
		||||
    The function
 | 
			
		||||
 | 
			
		||||
	GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual,
 | 
			
		||||
					  Pixmap pixmap, Colormap cmap );
 | 
			
		||||
 | 
			
		||||
    allows one to create a GLXPixmap with a specific colormap.  The image
 | 
			
		||||
    rendered into the pixmap may then be copied to a window (which uses the
 | 
			
		||||
    same colormap and visual) with the expected results.
 | 
			
		||||
 | 
			
		||||
GLX Protocol
 | 
			
		||||
 | 
			
		||||
    None since this is a client-side extension.
 | 
			
		||||
 | 
			
		||||
Errors
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
New State
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
Revision History
 | 
			
		||||
 | 
			
		||||
    8 June 2000 - initial specification
 | 
			
		||||
							
								
								
									
										85
									
								
								docs/MESA_release_buffers.spec
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										85
									
								
								docs/MESA_release_buffers.spec
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,85 @@
 | 
			
		||||
Name
 | 
			
		||||
 | 
			
		||||
    MESA_release_buffers
 | 
			
		||||
 | 
			
		||||
Name Strings
 | 
			
		||||
 | 
			
		||||
    GLX_MESA_release_buffers
 | 
			
		||||
 | 
			
		||||
Contact
 | 
			
		||||
 | 
			
		||||
    Brian Paul (brian 'at' mesa3d.org)
 | 
			
		||||
 | 
			
		||||
Status
 | 
			
		||||
 | 
			
		||||
    Shipping since Mesa 2.0 in October, 1996.
 | 
			
		||||
 | 
			
		||||
Version
 | 
			
		||||
 | 
			
		||||
    Last Modified Date:  8 June 2000
 | 
			
		||||
 | 
			
		||||
Number
 | 
			
		||||
 | 
			
		||||
    217
 | 
			
		||||
 | 
			
		||||
Dependencies
 | 
			
		||||
 | 
			
		||||
    OpenGL 1.0 or later is required.
 | 
			
		||||
    GLX 1.0 or later is required.
 | 
			
		||||
 | 
			
		||||
Overview
 | 
			
		||||
 | 
			
		||||
    Mesa's implementation of GLX is entirely implemented on the client side.
 | 
			
		||||
    Therefore, Mesa cannot immediately detect when an X window or pixmap is
 | 
			
		||||
    destroyed in order to free any ancilliary data associated with the window
 | 
			
		||||
    or pixmap.
 | 
			
		||||
 | 
			
		||||
    The glxMesaReleaseBuffers() function can be used to explicitly indicate
 | 
			
		||||
    when the back color buffer, depth buffer, stencil buffer, and/or accum-
 | 
			
		||||
    ulation buffer associated with a drawable can be freed.
 | 
			
		||||
 | 
			
		||||
IP Status
 | 
			
		||||
 | 
			
		||||
    Open-source; freely implementable.
 | 
			
		||||
 | 
			
		||||
Issues
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
New Procedures and Functions
 | 
			
		||||
 | 
			
		||||
    Bool glXReleaseBuffersMESA( Display *dpy, GLXDrawable d );
 | 
			
		||||
 | 
			
		||||
New Tokens
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 3 of the GLX 1.3 Specification (Functions and Errors)
 | 
			
		||||
 | 
			
		||||
    The function
 | 
			
		||||
 | 
			
		||||
	Bool glXReleaseBuffersMESA( Display *dpy, GLXDrawable d );
 | 
			
		||||
 | 
			
		||||
    causes all software ancilliary buffers (back buffer, depth, stencil,
 | 
			
		||||
    accum, etc) associated with the named drawable to be immediately
 | 
			
		||||
    deallocated.  True is returned if <d> is a valid Mesa GLX drawable,
 | 
			
		||||
    else False is returned.  After calling glXReleaseBuffersMESA, the
 | 
			
		||||
    drawable should no longer be used for GL rendering.  Results of
 | 
			
		||||
    attempting to do so are undefined.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
GLX Protocol
 | 
			
		||||
 | 
			
		||||
    None, since this is a client-side operation.
 | 
			
		||||
 | 
			
		||||
Errors
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
New State
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
Revision History
 | 
			
		||||
 | 
			
		||||
    8 June 2000 - initial specification
 | 
			
		||||
@@ -16,11 +16,11 @@ Status
 | 
			
		||||
 | 
			
		||||
Version
 | 
			
		||||
 | 
			
		||||
    $Id: MESA_resize_buffers.spec,v 1.1 1999/07/20 00:30:41 brianp Exp $
 | 
			
		||||
    $Id: MESA_resize_buffers.spec,v 1.2 2000/04/04 23:29:32 brianp Exp $
 | 
			
		||||
 | 
			
		||||
Number
 | 
			
		||||
 | 
			
		||||
    XXX none assigned
 | 
			
		||||
    196
 | 
			
		||||
 | 
			
		||||
Dependencies
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										85
									
								
								docs/MESA_set_3dfx_mode.spec
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										85
									
								
								docs/MESA_set_3dfx_mode.spec
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,85 @@
 | 
			
		||||
Name
 | 
			
		||||
 | 
			
		||||
    MESA_set_3dfx_mode
 | 
			
		||||
 | 
			
		||||
Name Strings
 | 
			
		||||
 | 
			
		||||
    GLX_MESA_set_3dfx_mode
 | 
			
		||||
 | 
			
		||||
Contact
 | 
			
		||||
 | 
			
		||||
    Brian Paul (brian 'at' mesa3d.org)
 | 
			
		||||
 | 
			
		||||
Status
 | 
			
		||||
 | 
			
		||||
    Shipping since Mesa 2.6 in February, 1998.
 | 
			
		||||
 | 
			
		||||
Version
 | 
			
		||||
 | 
			
		||||
    Last Modified Date:  8 June 2000
 | 
			
		||||
 | 
			
		||||
Number
 | 
			
		||||
 | 
			
		||||
    218
 | 
			
		||||
 | 
			
		||||
Dependencies
 | 
			
		||||
 | 
			
		||||
    OpenGL 1.0 or later is required.
 | 
			
		||||
    GLX 1.0 or later is required.
 | 
			
		||||
 | 
			
		||||
Overview
 | 
			
		||||
 | 
			
		||||
    The Mesa Glide driver allows full-screen rendering or rendering into
 | 
			
		||||
    an X window.  The glXSet3DfxModeMESA() function allows an application
 | 
			
		||||
    to switch between full-screen and windowed rendering.
 | 
			
		||||
 | 
			
		||||
IP Status
 | 
			
		||||
 | 
			
		||||
    Open-source; freely implementable.
 | 
			
		||||
 | 
			
		||||
Issues
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
New Procedures and Functions
 | 
			
		||||
 | 
			
		||||
    GLboolean glXSet3DfxModeMESA( GLint mode );
 | 
			
		||||
 | 
			
		||||
New Tokens
 | 
			
		||||
 | 
			
		||||
    GLX_3DFX_WINDOW_MODE_MESA	    0x1
 | 
			
		||||
    GLX_3DFX_FULLSCREEN_MODE_MESA   0x2
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 3 of the GLX 1.3 Specification (Functions and Errors)
 | 
			
		||||
 | 
			
		||||
    The Mesa Glide device driver allows either rendering in full-screen
 | 
			
		||||
    mode or rendering into an X window.  An application can switch between
 | 
			
		||||
    full-screen and window rendering with the command:
 | 
			
		||||
 | 
			
		||||
	GLboolean glXSet3DfxModeMESA( GLint mode );
 | 
			
		||||
 | 
			
		||||
    <mode> may either be GLX_3DFX_WINDOW_MODE_MESA to indicate window
 | 
			
		||||
    rendering or GLX_3DFX_FULLSCREEN_MODE_MESA to indicate full-screen mode.
 | 
			
		||||
 | 
			
		||||
    GL_TRUE is returned if <mode> is valid and the operation completed
 | 
			
		||||
    normally.  GL_FALSE is returned if <mode> is invalid or if the Glide
 | 
			
		||||
    driver is not being used.
 | 
			
		||||
 | 
			
		||||
    Note that only one drawable and context can be created at any given
 | 
			
		||||
    time with the Mesa Glide driver.
 | 
			
		||||
 | 
			
		||||
GLX Protocol
 | 
			
		||||
 | 
			
		||||
    None since this is a client-side extension.
 | 
			
		||||
 | 
			
		||||
Errors
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
New State
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
Revision History
 | 
			
		||||
 | 
			
		||||
    8 June 2000 - initial specification
 | 
			
		||||
							
								
								
									
										193
									
								
								docs/MESA_sprite_point.spec
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										193
									
								
								docs/MESA_sprite_point.spec
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,193 @@
 | 
			
		||||
XXX - Not complete yet!!!
 | 
			
		||||
 | 
			
		||||
Name
 | 
			
		||||
 | 
			
		||||
    MESA_sprite_point
 | 
			
		||||
 | 
			
		||||
Name Strings
 | 
			
		||||
 | 
			
		||||
    GL_MESA_sprite_point
 | 
			
		||||
 | 
			
		||||
Contact
 | 
			
		||||
 | 
			
		||||
    Brian Paul, VA Linux Systems Inc. (brianp 'at' valinux.com)
 | 
			
		||||
 | 
			
		||||
Status
 | 
			
		||||
 | 
			
		||||
    OBSOLETE - NEVER SHIPPED (use GL_NV_point_sprite)
 | 
			
		||||
 | 
			
		||||
Version
 | 
			
		||||
 | 
			
		||||
    $Id: MESA_sprite_point.spec,v 1.1.2.1 2002/09/20 19:14:11 brianp Exp $
 | 
			
		||||
 | 
			
		||||
Number
 | 
			
		||||
 | 
			
		||||
    ???
 | 
			
		||||
 | 
			
		||||
Dependencies
 | 
			
		||||
 | 
			
		||||
    GL_EXT_point_parameters effects the definition of this extension
 | 
			
		||||
    GL_ARB_multitexture effects the definition of this extension
 | 
			
		||||
 | 
			
		||||
Overview
 | 
			
		||||
	
 | 
			
		||||
    This extension modifies the way in which points are rendered,
 | 
			
		||||
    specifically when they're textured.  When SPRITE_POINT_MESA is enabled
 | 
			
		||||
    a point is rendered as if it were a quadrilateral with unique texture
 | 
			
		||||
    coordinates at each vertex.  This extension effectively turns points
 | 
			
		||||
    into sprites which may be rendered more easily and quickly than using
 | 
			
		||||
    conventional textured quadrilaterals.
 | 
			
		||||
 | 
			
		||||
    When using point size > 1 or attenuated points this extension is an
 | 
			
		||||
    effective way to render many small sprite images for particle systems
 | 
			
		||||
    or other effects.
 | 
			
		||||
 | 
			
		||||
Issues:
 | 
			
		||||
 | 
			
		||||
    1. How are the texture coordinates computed?
 | 
			
		||||
 | 
			
		||||
       The lower-left corner has texture coordinate (0,0,r,q).
 | 
			
		||||
       The lower-right, (1,0,r,q).  The upper-right, (1,1,r,q).
 | 
			
		||||
       The upper-left, (0,1,r,q).
 | 
			
		||||
 | 
			
		||||
    2. What about texgen and texture matrices?
 | 
			
		||||
 | 
			
		||||
       Texgen and the texture matrix have no effect on the point's s and t
 | 
			
		||||
       texture coordinates.  The r and q coordinates may have been computed
 | 
			
		||||
       by texgen or the texture matrix.  Note that with a 3D texture and/or
 | 
			
		||||
       texgen that the r coordinate could be used to select a slice in the
 | 
			
		||||
       3D texture.
 | 
			
		||||
 | 
			
		||||
    3. What about point smoothing?
 | 
			
		||||
 | 
			
		||||
       When point smoothing is enabled, a triangle fan could be rendered
 | 
			
		||||
       to approximate a circular point.  This could be problematic to
 | 
			
		||||
       define and implement so POINT_SMOOTH is ignored when drawing sprite
 | 
			
		||||
       points.
 | 
			
		||||
 | 
			
		||||
       Smoothed points can be approximated by using an appropriate texture
 | 
			
		||||
       images, alpha testing and blending.
 | 
			
		||||
 | 
			
		||||
       POLYGON_SMOOTH does effect the rendering of the quadrilateral, however.
 | 
			
		||||
 | 
			
		||||
    4. What about sprite rotation?
 | 
			
		||||
 | 
			
		||||
       There is none.  Sprite points are always rendered as window-aligned
 | 
			
		||||
       squares.  One could define rotated texture images if desired.  A 3D
 | 
			
		||||
       texture and appropriate texture r coordinates could be used to
 | 
			
		||||
       effectively specify image rotation per point.
 | 
			
		||||
 | 
			
		||||
    5. What about POLYGON_MODE?
 | 
			
		||||
 | 
			
		||||
       POLYGON_MODE does not effect the rasterization of the quadrilateral.
 | 
			
		||||
 | 
			
		||||
    6. What about POLYGON_CULL?
 | 
			
		||||
 | 
			
		||||
       TBD.  Polygon culling is normally specified and implemented in the
 | 
			
		||||
       transformation stage of OpenGL.  However, some rasterization hardware
 | 
			
		||||
       implements it later during triangle setup.
 | 
			
		||||
 | 
			
		||||
       Polygon culling wouldn't be useful for sprite points since the
 | 
			
		||||
       quadrilaterals are always defined in counter-clockwise order in
 | 
			
		||||
       window space.  For that reason, polygon culling should probably be
 | 
			
		||||
       ignored.
 | 
			
		||||
 | 
			
		||||
    7. Should sprite points be alpha-attenuated if their size is below the
 | 
			
		||||
       point parameter's threshold size?
 | 
			
		||||
 | 
			
		||||
    8. Should there be an advertisized maximum sprite point size?
 | 
			
		||||
 | 
			
		||||
       No.  Since we're rendering the point as a quadrilateral there's no
 | 
			
		||||
       need to limit the size.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
New Procedures and Functions
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
New Tokens
 | 
			
		||||
    
 | 
			
		||||
    Accepted by the <pname> parameter of Enable, Disable, IsEnabled,
 | 
			
		||||
    GetIntegerv, GetBooleanv, GetFloatv and GetDoublev:
 | 
			
		||||
 | 
			
		||||
	SPRITE_POINT_MESA		0x????
 | 
			
		||||
        MAX_SPRITE_POINT_SIZE_MESA      0x????   (need this?)
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 2 of the 1.1 Specification (OpenGL Operation)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 3 of the 1.1 Specification (Rasterization)
 | 
			
		||||
 | 
			
		||||
    Section ???.
 | 
			
		||||
 | 
			
		||||
    When SPRITE_POINT_MESA is enabled points are rasterized as screen-
 | 
			
		||||
    aligned quadrilaterals.  If the four vertices of the quadrilateral
 | 
			
		||||
    are labeled A, B, C, and D, starting at the lower-left corner and moving
 | 
			
		||||
    counter-clockwise around the quadrilateral, then the vertex and
 | 
			
		||||
    texture coordinates are computed as follows:
 | 
			
		||||
 | 
			
		||||
      vertex   window coordinate       texture coordinate
 | 
			
		||||
        A      (x-r, y-r, z, w)          (0, 0, r, q)
 | 
			
		||||
        B      (x+r, y-r, z, w)          (1, 0, r, q)
 | 
			
		||||
        C      (x+r, y+r, z, w)          (1, 1, r, q)
 | 
			
		||||
        D      (x-r, y+r, z, w)          (0, 1, r, q)
 | 
			
		||||
 | 
			
		||||
    where x, y, z, w are the point's window coordinates, r and q are the
 | 
			
		||||
    point's 3rd and 4th texture coordinates  and r is half the point's
 | 
			
		||||
    size.  The other vertex attributes (such as the color and fog coordinate)
 | 
			
		||||
    are simply duplicated from the original point vertex.
 | 
			
		||||
 | 
			
		||||
    Point size may either be specified with PointSize or computed
 | 
			
		||||
    according to the EXT_point_parameters extension.
 | 
			
		||||
 | 
			
		||||
    The new texture coordinates are not effected by texgen or the texture
 | 
			
		||||
    matrix.  Note, however, that the texture r and q coordinates are passed
 | 
			
		||||
    unchanged and may have been computed with texgen and/or the texture
 | 
			
		||||
    matrix.
 | 
			
		||||
 | 
			
		||||
    If multiple texture units are present the same texture coordinate is
 | 
			
		||||
    used for all texture units.
 | 
			
		||||
 | 
			
		||||
    The point is then rendered as if it were a quadrilateral using the
 | 
			
		||||
    normal point sampling rules.  POLYGON_MODE does not effect the
 | 
			
		||||
    rasterization of the quadrilateral but POLYGON_SMOOTH does.
 | 
			
		||||
 | 
			
		||||
    POINT_SMOOTH has no effect when SPRITE_POINT_MESA is enabled.
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations
 | 
			
		||||
and the Frame Buffer)
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 5 of the 1.1 Specification (Special Functions)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 6 of the 1.1 Specification (State and State Requests)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to the GLX Specification
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
GLX Protocol
 | 
			
		||||
 | 
			
		||||
    TBD
 | 
			
		||||
 | 
			
		||||
Errors
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
New State
 | 
			
		||||
 | 
			
		||||
    Add boolean variable SPRITE_POINT_MESA to the point attribute group.
 | 
			
		||||
 | 
			
		||||
Revision History
 | 
			
		||||
 | 
			
		||||
    Version 1.0 - 4 Dec 2000
 | 
			
		||||
        Original draft.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										360
									
								
								docs/MESA_trace.spec
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										360
									
								
								docs/MESA_trace.spec
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,360 @@
 | 
			
		||||
Name
 | 
			
		||||
 | 
			
		||||
     MESA_trace
 | 
			
		||||
 | 
			
		||||
Name Strings
 | 
			
		||||
 | 
			
		||||
     GL_MESA_TRACE
 | 
			
		||||
 | 
			
		||||
Contact
 | 
			
		||||
    
 | 
			
		||||
    Bernd Kreimeier, Loki Entertainment, bk 'at' lokigames.com
 | 
			
		||||
    Brian Paul, VA Linux Systems, Inc., brianp 'at' valinux.com
 | 
			
		||||
 | 
			
		||||
Status
 | 
			
		||||
 | 
			
		||||
    XXX - Not complete yet!!!
 | 
			
		||||
 | 
			
		||||
Version
 | 
			
		||||
 | 
			
		||||
    $Id: MESA_trace.spec,v 1.2 2001/01/29 16:10:18 brianp Exp $
 | 
			
		||||
 | 
			
		||||
Number
 | 
			
		||||
 | 
			
		||||
    none yet
 | 
			
		||||
 | 
			
		||||
Dependencies
 | 
			
		||||
 | 
			
		||||
    OpenGL 1.2 is required.
 | 
			
		||||
    The extension is written against the OpenGL 1.2 Specification
 | 
			
		||||
 | 
			
		||||
Overview
 | 
			
		||||
 | 
			
		||||
    Provides the application with means to enable and disable logging
 | 
			
		||||
    of GL calls including parameters as readable text. The verbosity
 | 
			
		||||
    of the generated log can be controlled. The resulting logs are
 | 
			
		||||
    valid (but possibly incomplete) C code and can be compiled and 
 | 
			
		||||
    linked for standalone test programs. The set of calls and the 
 | 
			
		||||
    amount of static data that is logged can be controlled at runtime. 
 | 
			
		||||
    The application can add comments and enable or disable tracing of GL 
 | 
			
		||||
    operations at any time. The data flow from the application to GL
 | 
			
		||||
    and back is unaffected except for timing.
 | 
			
		||||
 | 
			
		||||
    Application-side implementation of these features raises namespace
 | 
			
		||||
    and linkage issues. In the driver dispatch table a simple
 | 
			
		||||
    "chain of responsibility" pattern (aka "composable piepline")
 | 
			
		||||
    can be added.
 | 
			
		||||
 | 
			
		||||
IP Status
 | 
			
		||||
 | 
			
		||||
    The extension spec is in the public domain.  The current implementation
 | 
			
		||||
    in Mesa is covered by Mesa's XFree86-style copyright by the authors above.
 | 
			
		||||
    This extension is partially inspired by the Quake2 QGL wrapper.
 | 
			
		||||
 | 
			
		||||
Issues
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
    (1) Is this Extension obsolete because it can
 | 
			
		||||
    be implemented as a wrapper DLL?
 | 
			
		||||
 | 
			
		||||
      RESOLVED: No. While certain operating systems (Win32) provide linkers 
 | 
			
		||||
      that facilitate this kind of solution, other operating systems
 | 
			
		||||
      (Linux) do not support hierarchical linking, so a wrapper solution
 | 
			
		||||
      would result in symbol collisions.
 | 
			
		||||
      Further, IHV's might have builtin support for tracing GL execution 
 | 
			
		||||
      that enjoys privileged access, or that they do not wish to separate
 | 
			
		||||
      the tracing code from their driver code base.
 | 
			
		||||
 | 
			
		||||
    (2) Should the Trace API explicitely support the notion of "frames? 
 | 
			
		||||
    This would require hooking into glXSwapBuffers calls as well.
 | 
			
		||||
 | 
			
		||||
      RESOLVED: No. The application can use NewTraceMESA/EndTraceMESA
 | 
			
		||||
      and TraceComment along with external parsing tools to split the 
 | 
			
		||||
      trace into frames, in whatever way considered adequate.
 | 
			
		||||
 | 
			
		||||
    (2a) Should GLX calls be traced?
 | 
			
		||||
 | 
			
		||||
      PBuffers and other render-to-texture solutions demonstrate that
 | 
			
		||||
      context level commands beyond SwapBuffers might have to be
 | 
			
		||||
      traced. The GL DLL exports the entry points, so this would not
 | 
			
		||||
      be out of the question. 
 | 
			
		||||
 | 
			
		||||
    (3) Should the specification mandate the actual output format?
 | 
			
		||||
 | 
			
		||||
      RESOLVED: No. It is sufficient to guarantee that all data and commands 
 | 
			
		||||
      will be traced as requested by Enable/DisableTraceMESA, in the order
 | 
			
		||||
      encountered. Whether the resulting trace is available as a readable 
 | 
			
		||||
      text file, binary metafile, compilable source code, much less which 
 | 
			
		||||
      indentation and formatting has been used, is up to the implementation. 
 | 
			
		||||
      For the same reason this specification does not enforce or prohibit
 | 
			
		||||
      additional information added to the trace (statistics, profiling/timing, 
 | 
			
		||||
      warnings on possible error conditions).
 | 
			
		||||
 | 
			
		||||
    (4) Should the comment strings associated with names and pointer (ranges) 
 | 
			
		||||
    be considered persistent state?
 | 
			
		||||
 | 
			
		||||
      RESOLVED: No. The implementation is not forced to use this information 
 | 
			
		||||
      on subsequent occurences of name/pointer, and is free to consider it 
 | 
			
		||||
      transient state.
 | 
			
		||||
 
 | 
			
		||||
    (5) Should comment commands be prohibited between Begin/End?
 | 
			
		||||
 | 
			
		||||
      RESOLVED: Yes, with the exception of TraceCommentMESA. TraceCommentMESA 
 | 
			
		||||
      is transient, the other commands might cause storage of persistent
 | 
			
		||||
      data in the context. There is no need to have the ability mark names 
 | 
			
		||||
      or pointers between Begin and End.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
New Procedures and Functions
 | 
			
		||||
 
 | 
			
		||||
    void NewTraceMESA( bitfield mask, const ubyte * traceName )
 | 
			
		||||
 | 
			
		||||
    void EndTraceMESA( void )
 | 
			
		||||
 | 
			
		||||
    void EnableTraceMESA( bitfield mask )
 | 
			
		||||
 | 
			
		||||
    void DisableTraceMESA( bitfield mask )
 | 
			
		||||
 | 
			
		||||
    void TraceAssertAttribMESA( bitfield attribMask )
 | 
			
		||||
 | 
			
		||||
    void TraceCommentMESA( const ubyte* comment )
 | 
			
		||||
 | 
			
		||||
    void TraceTextureMESA( uint name, const ubyte* comment )
 | 
			
		||||
 | 
			
		||||
    void TraceListMESA( uint name, const ubyte* comment )
 | 
			
		||||
 | 
			
		||||
    void TracePointerMESA( void* pointer, const ubyte* comment )
 | 
			
		||||
 | 
			
		||||
    void TracePointerRangeMESA( const void* first, 
 | 
			
		||||
                                const void* last, 
 | 
			
		||||
                                const ubyte* comment ) 
 | 
			
		||||
 | 
			
		||||
New Tokens
 | 
			
		||||
 
 | 
			
		||||
    Accepted by the <mask> parameter of EnableTrace and DisableTrace:
 | 
			
		||||
 | 
			
		||||
       TRACE_ALL_BITS_MESA           0xFFFF
 | 
			
		||||
       TRACE_OPERATIONS_BIT_MESA     0x0001
 | 
			
		||||
       TRACE_PRIMITIVES_BIT_MESA     0x0002
 | 
			
		||||
       TRACE_ARRAYS_BIT_MESA         0x0004
 | 
			
		||||
       TRACE_TEXTURES_BIT_MESA       0x0008
 | 
			
		||||
       TRACE_PIXELS_BIT_MESA         0x0010
 | 
			
		||||
       TRACE_ERRORS_BIT_MESA         0x0020
 | 
			
		||||
 | 
			
		||||
    Accepted by the <pname> parameter of GetIntegerv, GetBooleanv,
 | 
			
		||||
    GetFloatv, and GetDoublev:
 | 
			
		||||
 | 
			
		||||
       TRACE_MASK_MESA               0x8755
 | 
			
		||||
 | 
			
		||||
    Accepted by the <pname> parameter to GetString:
 | 
			
		||||
 | 
			
		||||
       TRACE_NAME_MESA               0x8756
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 2 of the OpenGL 1.2.1 Specification (OpenGL Operation)
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 3 of the OpenGL 1.2.1 Specification (OpenGL Operation)
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 4 of the OpenGL 1.2.1 Specification (OpenGL Operation)
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 5 of the OpenGL 1.2.1 Specification (Special Functions)
 | 
			
		||||
 | 
			
		||||
    Add a new section:
 | 
			
		||||
 | 
			
		||||
    5.7 Tracing
 | 
			
		||||
 | 
			
		||||
    The tracing facility is used to record the execution of a GL program
 | 
			
		||||
    to a human-readable log.  The log appears as a sequence of GL commands
 | 
			
		||||
    using C syntax.  The primary intention of tracing is to aid in program
 | 
			
		||||
    debugging.
 | 
			
		||||
 | 
			
		||||
    A trace is started with the command
 | 
			
		||||
 | 
			
		||||
      void NewTraceMESA( bitfield mask, const GLubyte * traceName )
 | 
			
		||||
 | 
			
		||||
    <mask> may be any value accepted by PushAttrib and specifies a set of
 | 
			
		||||
    attribute groups.  The state values included in those attribute groups
 | 
			
		||||
    is written to the trace as a sequence of GL commands.
 | 
			
		||||
 | 
			
		||||
    <traceName> specifies a name or label for the trace.  It is expected
 | 
			
		||||
    that <traceName> will be interpreted as a filename in most implementations.
 | 
			
		||||
 | 
			
		||||
    A trace is ended by calling the command
 | 
			
		||||
 | 
			
		||||
      void EndTraceMESA( void )
 | 
			
		||||
 | 
			
		||||
    It is illegal to call NewTraceMESA or EndTraceMESA between Begin and End. 
 | 
			
		||||
 | 
			
		||||
    The commands
 | 
			
		||||
 | 
			
		||||
      void EnableTraceMESA( bitfield mask )
 | 
			
		||||
      void DisableTraceMESA( bitfield mask )
 | 
			
		||||
 | 
			
		||||
    enable or disable tracing of different classes of GL commands.
 | 
			
		||||
    <mask> may be the union of any of TRACE_OPERATIONS_BIT_MESA,
 | 
			
		||||
    TRACE_PRIMITIVES_BIT_MESA, TRACE_ARRAYS_BIT_MESA, TRACE_TEXTURES_BIT_MESA,
 | 
			
		||||
    and TRACE_PIXELS_BIT_MESA.  The special token TRACE_ALL_BITS_MESA
 | 
			
		||||
    indicates all classes of commands are to be logged.
 | 
			
		||||
 | 
			
		||||
    TRACE_OPERATIONS_BIT_MESA controls logging of all commands outside of
 | 
			
		||||
    Begin/End, including Begin/End.
 | 
			
		||||
  
 | 
			
		||||
    TRACE_PRIMITIVES_BIT_MESA controls logging of all commands inside of
 | 
			
		||||
    Begin/End, including Begin/End.
 | 
			
		||||
 
 | 
			
		||||
    TRACE_ARRAYS_BIT_MESA controls logging of VertexPointer, NormalPointer,
 | 
			
		||||
    ColorPointer, IndexPointer, TexCoordPointer and EdgeFlagPointer commands.
 | 
			
		||||
 | 
			
		||||
    TRACE_TEXTURES_BIT_MESA controls logging of texture data dereferenced by
 | 
			
		||||
    TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, and
 | 
			
		||||
    TexSubImage3D commands.
 | 
			
		||||
 | 
			
		||||
    TRACE_PIXELS_BIT_MESA controls logging of image data dereferenced by
 | 
			
		||||
    Bitmap and DrawPixels commands.
 | 
			
		||||
 | 
			
		||||
    TRACE_ERRORS_BIT_MESA controls logging of all errors. If this bit is 
 | 
			
		||||
    set, GetError will be executed whereever applicable, and the result will 
 | 
			
		||||
    be added to the trace as a comment. The error returns are cached and 
 | 
			
		||||
    returned to the application on its GetError calls. If the user does not 
 | 
			
		||||
    wish the additional GetError calls to be performed, this bit should not
 | 
			
		||||
    be set.
 | 
			
		||||
    
 | 
			
		||||
    The command
 | 
			
		||||
 | 
			
		||||
      void TraceCommentMESA( const ubyte* comment )
 | 
			
		||||
 | 
			
		||||
    immediately adds the <comment> string to the trace output, surrounded
 | 
			
		||||
    by C-style comment delimiters.
 | 
			
		||||
 | 
			
		||||
    The commands
 | 
			
		||||
 | 
			
		||||
      void TraceTextureMESA( uint name, const ubyte* comment )
 | 
			
		||||
      void TraceListMESA( uint name, const ubyte* comment )
 | 
			
		||||
 | 
			
		||||
    associates <comment> with the texture object or display list specified
 | 
			
		||||
    by <name>.  Logged commands which reference the named texture object or
 | 
			
		||||
    display list will be annotated with <comment>.  If IsTexture(name) or
 | 
			
		||||
    IsList(name) fail (respectively) the command is quietly ignored.
 | 
			
		||||
 | 
			
		||||
    The commands
 | 
			
		||||
 | 
			
		||||
      void TracePointerMESA( void* pointer, const ubyte* comment )
 | 
			
		||||
 | 
			
		||||
      void TracePointerRangeMESA( const void* first, 
 | 
			
		||||
                                  const void* last,
 | 
			
		||||
                                  const ubyte* comment ) 
 | 
			
		||||
 | 
			
		||||
    associate <comment> with the address specified by <pointer> or with
 | 
			
		||||
    a range of addresses specified by <first> through <last>.
 | 
			
		||||
    Any logged commands which reference <pointer> or an address between
 | 
			
		||||
    <first> and <last> will be annotated with <comment>.
 | 
			
		||||
 | 
			
		||||
    The command
 | 
			
		||||
 | 
			
		||||
      void TraceAssertAttribMESA( bitfield attribMask )
 | 
			
		||||
 | 
			
		||||
    will add GL state queries and assertion statements to the log to
 | 
			
		||||
    confirm that the current state at the time TraceAssertAttrib is
 | 
			
		||||
    executed matches the current state when the trace log is executed
 | 
			
		||||
    in the future.
 | 
			
		||||
 | 
			
		||||
    <attribMask> is any value accepted by PushAttrib and specifies
 | 
			
		||||
    the groups of state variables which are to be asserted.
 | 
			
		||||
 | 
			
		||||
    The commands NewTraceMESA, EndTraceMESA, EnableTraceMESA, DisableTraceMESA,
 | 
			
		||||
    TraceAssertAttribMESA, TraceCommentMESA, TraceTextureMESA, TraceListMESA, 
 | 
			
		||||
    TracePointerMESA and TracePointerRangeMESA are not compiled into display lists.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    Examples:
 | 
			
		||||
 | 
			
		||||
    The command NewTraceMESA(DEPTH_BUFFER_BIT, "log") will query the state
 | 
			
		||||
    variables DEPTH_TEST, DEPTH_FUNC, DEPTH_WRITEMASK, and DEPTH_CLEAR_VALUE
 | 
			
		||||
    to get the values <test>, <func>, <mask>, and <clear> respectively.
 | 
			
		||||
    Statements equivalent to the following will then be logged:
 | 
			
		||||
 | 
			
		||||
       glEnable(GL_DEPTH_TEST);   (if <test> is true)
 | 
			
		||||
       glDisable(GL_DEPTH_TEST);  (if <test> is false)
 | 
			
		||||
       glDepthFunc(<func>); 
 | 
			
		||||
       glDepthMask(<mask>);
 | 
			
		||||
       glClearDepth(<clear>);
 | 
			
		||||
   
 | 
			
		||||
 | 
			
		||||
    The command TraceAssertAttribMESA(DEPTH_BUFFER_BIT) will query the state
 | 
			
		||||
    variables DEPTH_TEST, DEPTH_FUNC, DEPTH_WRITEMASK, and DEPTH_CLEAR_VALUE
 | 
			
		||||
    to get the values <test>, <func>, <mask>, and <clear> respectively.
 | 
			
		||||
    The resulting trace might then look will like this:
 | 
			
		||||
 | 
			
		||||
    {
 | 
			
		||||
      GLboolean b;
 | 
			
		||||
      GLint i;
 | 
			
		||||
      GLfloat f;
 | 
			
		||||
      b = glIsEnabled(GL_DEPTH_TEST);
 | 
			
		||||
      assert(b == <test>);
 | 
			
		||||
      glGetIntegerv(GL_DEPTH_FUNC, &i);
 | 
			
		||||
      assert(i == <func>);
 | 
			
		||||
      glGetIntegerv(GL_DEPTH_MASK, &i);
 | 
			
		||||
      assert(i == <mask>);
 | 
			
		||||
      glGetFloatv(GL_DEPTH_CLEAR_VALUE, &f);
 | 
			
		||||
      assert(f == <clear>);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 6 of the OpenGL 1.2.1 Specification 
 | 
			
		||||
    (State and State Requests)
 | 
			
		||||
 | 
			
		||||
    Querying TRACE_MASK_MESA with GetIntegerv, GetFloatv, GetBooleanv or
 | 
			
		||||
    GetDoublev returns the current command class trace mask.
 | 
			
		||||
 | 
			
		||||
    Querying TRACE_NAME_MESA with GetString returns the current trace name.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Additions to Appendix A of the OpenGL 1.2.1 Specification (Invariance)
 | 
			
		||||
 | 
			
		||||
    The MESA_trace extension can be used in a way that does not affect data 
 | 
			
		||||
    flow from application to OpenGL, as well as data flow from OpenGL to 
 | 
			
		||||
    application, except for timing, possible print I/O. TRACE_ERRORS_BIT_MESA
 | 
			
		||||
    will add additional GetError queries. Setting a trace mask with NewTraceMESA
 | 
			
		||||
    as well as use of TraceAssertAttribMESA might cause additional state queries.
 | 
			
		||||
    With the possible exception of performance, OpenGL rendering should not be
 | 
			
		||||
    affected at all by a properly chosen logging operation.
 | 
			
		||||
 | 
			
		||||
Additions to the AGL/GLX/WGL Specifications
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
GLX Protocol
 | 
			
		||||
 | 
			
		||||
    None. The logging operation is carried out client-side, by exporting
 | 
			
		||||
    entry points to the wrapper functions that execute the logging operation.
 | 
			
		||||
 | 
			
		||||
Errors
 | 
			
		||||
 | 
			
		||||
    INVALID_OPERATION is generated if any trace command except TraceCommentMESA
 | 
			
		||||
    is called between Begin and End.
 | 
			
		||||
 | 
			
		||||
New State
 | 
			
		||||
 | 
			
		||||
    The current trace name and current command class mask are stored
 | 
			
		||||
    per-context.
 | 
			
		||||
 | 
			
		||||
New Implementation Dependent State
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
Revision History
 | 
			
		||||
 | 
			
		||||
  * Revision 0.1 - Initial draft from template (bk000415)
 | 
			
		||||
  * Revision 0.2 - Draft (bk000906)
 | 
			
		||||
  * Revision 0.3 - Draft (bk000913)
 | 
			
		||||
  * Revision 0.4 - Reworked text, fixed typos (bp000914)
 | 
			
		||||
  * Revision 0.5 - Assigned final GLenum values (bp001103)
 | 
			
		||||
  * Revision 0.6 - TRACE_ERRORS_BIT_MESA (bk000916)
 | 
			
		||||
  * Revision 0.7 - Added MESA postfix (bk010126)
 | 
			
		||||
 | 
			
		||||
@@ -16,11 +16,11 @@ Status
 | 
			
		||||
 | 
			
		||||
Version
 | 
			
		||||
 | 
			
		||||
    $Id: MESA_window_pos.spec,v 1.1 1999/07/20 00:30:41 brianp Exp $
 | 
			
		||||
    $Id: MESA_window_pos.spec,v 1.3 2000/04/04 23:29:32 brianp Exp $
 | 
			
		||||
 | 
			
		||||
Number
 | 
			
		||||
 | 
			
		||||
    XXX non assigned
 | 
			
		||||
    197
 | 
			
		||||
 | 
			
		||||
Dependencies
 | 
			
		||||
 | 
			
		||||
@@ -33,7 +33,7 @@ Overview
 | 
			
		||||
    coordinate with the RasterPos command, the modelview matrix, projection
 | 
			
		||||
    matrix and viewport must be set very carefully.  Furthermore, if the
 | 
			
		||||
    desired window coordinate is outside of the window's bounds one must
 | 
			
		||||
    rely a subtle side-effect of the Bitmap command in order to circumvent
 | 
			
		||||
    rely on a subtle side-effect of the Bitmap command in order to circumvent
 | 
			
		||||
    frustum clipping.
 | 
			
		||||
 | 
			
		||||
    This extension provides a set of functions to directly set the
 | 
			
		||||
@@ -51,6 +51,26 @@ New Procedures and Functions
 | 
			
		||||
    void WindowPos2fMESA(float x, float y)
 | 
			
		||||
    void WindowPos2iMESA(int x, int y)
 | 
			
		||||
    void WindowPos2sMESA(short x, short y)
 | 
			
		||||
    void WindowPos2ivMESA(const int *p)
 | 
			
		||||
    void WindowPos2svMESA(const short *p)
 | 
			
		||||
    void WindowPos2fvMESA(const float *p)
 | 
			
		||||
    void WindowPos2dvMESA(const double *p)
 | 
			
		||||
    void WindowPos3iMESA(int x, int y, int z)
 | 
			
		||||
    void WindowPos3sMESA(short x, short y, short z)
 | 
			
		||||
    void WindowPos3fMESA(float x, float y, float z)
 | 
			
		||||
    void WindowPos3dMESA(double x, double y, double z)
 | 
			
		||||
    void WindowPos3ivMESA(const int *p)
 | 
			
		||||
    void WindowPos3svMESA(const short *p)
 | 
			
		||||
    void WindowPos3fvMESA(const float *p)
 | 
			
		||||
    void WindowPos3dvMESA(const double *p)
 | 
			
		||||
    void WindowPos4iMESA(int x, int y, int z, int w)
 | 
			
		||||
    void WindowPos4sMESA(short x, short y, short z, short w)
 | 
			
		||||
    void WindowPos4fMESA(float x, float y, float z, float w)
 | 
			
		||||
    void WindowPos4dMESA(double x, double y, double z, double )
 | 
			
		||||
    void WindowPos4ivMESA(const int *p)
 | 
			
		||||
    void WindowPos4svMESA(const short *p)
 | 
			
		||||
    void WindowPos4fvMESA(const float *p)
 | 
			
		||||
    void WindowPos4dvMESA(const double *p)
 | 
			
		||||
 | 
			
		||||
New Tokens
 | 
			
		||||
 | 
			
		||||
@@ -64,7 +84,7 @@ Additions to Chapter 2 of the OpenGL 1.2 Specification (OpenGL Operation)
 | 
			
		||||
      WindowPosMESA commands:
 | 
			
		||||
 | 
			
		||||
         void WindowPos{234}{sidf}MESA( T coords );
 | 
			
		||||
         void Window Pos{234}{sidf}vMESA( T coords );
 | 
			
		||||
         void WindowPos{234}{sidf}vMESA( T coords );
 | 
			
		||||
 | 
			
		||||
      WindosPos4MESA takes four values indicating x, y, z, and w.
 | 
			
		||||
      WindowPos3MESA (or WindowPos2MESA) is analaguos, but sets only
 | 
			
		||||
@@ -78,14 +98,6 @@ Additions to Chapter 2 of the OpenGL 1.2 Specification (OpenGL Operation)
 | 
			
		||||
      color, color index and texture coordinate update the current raster
 | 
			
		||||
      position's associated data.
 | 
			
		||||
 | 
			
		||||
      The current raster distance ??? XXX ???
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Additions to the AGL/GLX/WGL Specifications
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
@@ -100,7 +112,6 @@ Errors
 | 
			
		||||
    INVALID_OPERATION is generated if WindowPosMESA is called betweeen
 | 
			
		||||
    Begin and End.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
New State
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
@@ -112,3 +123,5 @@ New Implementation Dependent State
 | 
			
		||||
Revision History
 | 
			
		||||
 | 
			
		||||
  * Revision 1.0 - Initial specification
 | 
			
		||||
  * Revision 1.1 - Minor clean-up  (7 Jan 2000, Brian Paul)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										197
									
								
								docs/MESA_ycbcr_texture.spec
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										197
									
								
								docs/MESA_ycbcr_texture.spec
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,197 @@
 | 
			
		||||
Name
 | 
			
		||||
 | 
			
		||||
    MESA_ycbcr_texture
 | 
			
		||||
 | 
			
		||||
Name Strings
 | 
			
		||||
 | 
			
		||||
    GL_MESA_ycbcr_texture
 | 
			
		||||
 | 
			
		||||
Contact
 | 
			
		||||
 | 
			
		||||
    Brian Paul, Tungsten Graphics, Inc. (brian 'at' tungstengraphics.com)
 | 
			
		||||
    Keith Whitwell, Tungsten Graphics, Inc.  (keith 'at' tungstengraphics.com)
 | 
			
		||||
 | 
			
		||||
Status
 | 
			
		||||
 | 
			
		||||
    Shipping (Mesa 4.0.4 and later)
 | 
			
		||||
 | 
			
		||||
Version
 | 
			
		||||
 | 
			
		||||
    1.0
 | 
			
		||||
 | 
			
		||||
Number
 | 
			
		||||
 | 
			
		||||
    TBD
 | 
			
		||||
 | 
			
		||||
Dependencies
 | 
			
		||||
 | 
			
		||||
    OpenGL 1.0 or later is required
 | 
			
		||||
    This extensions is written against the OpenGL 1.4 Specification.
 | 
			
		||||
    NV_texture_rectangle effects the definition of this extension.
 | 
			
		||||
 | 
			
		||||
Overview
 | 
			
		||||
 | 
			
		||||
    This extension supports texture images in the YCbCr format.  There is
 | 
			
		||||
    no support for converting YCbCr images to RGB or vice versa.  The
 | 
			
		||||
    intention is for YCbCr image data to be directly sent to the renderer
 | 
			
		||||
    without any pixel transfer operations.  Only 2D texture images are
 | 
			
		||||
    supported (not glDrawPixels, glReadPixels, etc).
 | 
			
		||||
 | 
			
		||||
    A YCbCr pixel (texel) is a 16-bit unsigned short with two components.
 | 
			
		||||
    The first component is luminance (Y).  For pixels in even-numbered
 | 
			
		||||
    image columns, the second component is Cb.  For pixels in odd-numbered
 | 
			
		||||
    image columns, the second component is Cr.  If one were to convert the
 | 
			
		||||
    data to RGB one would need to examine two pixels from columns N and N+1
 | 
			
		||||
    (where N is even) to deduce the RGB color.
 | 
			
		||||
 | 
			
		||||
IP Status
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Issues
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
New Procedures and Functions
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
New Tokens
 | 
			
		||||
 | 
			
		||||
    Accepted by the <internalFormat> and <format> parameters of
 | 
			
		||||
    TexImage2D and TexSubImage2D:
 | 
			
		||||
 | 
			
		||||
        GL_YCBCR_MESA                   0x8757
 | 
			
		||||
 | 
			
		||||
    Accepted by the <type> parameter of TexImage2D and TexSubImage2D:
 | 
			
		||||
 | 
			
		||||
        GL_UNSIGNED_SHORT_8_8_MESA      0x85BA /* same as Apple's */
 | 
			
		||||
        GL_UNSIGNED_SHORT_8_8_REV_MESA  0x85BB /* same as Apple's */
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 2 of the OpenGL 1.4 Specification (OpenGL Operation)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 3 of the OpenGL 1.4 Specification (Rasterization)
 | 
			
		||||
 | 
			
		||||
    In section 3.6.4, Rasterization of Pixel Rectangles, on page 102,
 | 
			
		||||
    add the following to Table 3.8 (Packed pixel formats):
 | 
			
		||||
    
 | 
			
		||||
    type Parameter                GL Data   Number of        Matching
 | 
			
		||||
     Token Name                    Type     Components     Pixel Formats
 | 
			
		||||
    --------------                -------   ----------     -------------
 | 
			
		||||
    UNSIGNED_SHORT_8_8_MESA       ushort         3         YCBCR_422_MESA
 | 
			
		||||
    UNSIGNED_SHORT_8_8_REV_MESA   ushort         3         YCBCR_422_MESA
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    In section 3.6.4, Rasterization of Pixel Rectangles, on page 102,
 | 
			
		||||
    add the following to Table 3.10 (UNSIGNED_SHORT formats):
 | 
			
		||||
 | 
			
		||||
    UNSIGNED_SHORT_8_8_MESA:
 | 
			
		||||
 | 
			
		||||
      15  14  13  12  11  10  9   8   7   6   5   4   3   2   1   0
 | 
			
		||||
    +-------------------------------+-------------------------------+
 | 
			
		||||
    |              1st              |              2nd              |
 | 
			
		||||
    +-------------------------------+-------------------------------+
 | 
			
		||||
                        
 | 
			
		||||
    UNSIGNED_SHORT_8_8_REV_MESA:
 | 
			
		||||
 | 
			
		||||
      15  14  13  12  11  10  9   8   7   6   5   4   3   2   1   0
 | 
			
		||||
    +-------------------------------+-------------------------------+
 | 
			
		||||
    |              2nd              |              1st              |
 | 
			
		||||
    +-------------------------------+-------------------------------+
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    In section 3.6.4, Rasterization of Pixel Rectangles, on page 102,
 | 
			
		||||
    add the following to Table 3.12 (Packed pixel fiedl assignments):
 | 
			
		||||
 | 
			
		||||
                       First       Second     Third      Fourth
 | 
			
		||||
    Format             Element     Element    Element    Element
 | 
			
		||||
    ------             -------     -------    -------    -------
 | 
			
		||||
    YCBCR_422_MESA     luminance   chroma
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    In section 3.8.1, Texture Image Specification, on page 125, add
 | 
			
		||||
    another item to the list of TexImage2D and TexImage3D equivalence
 | 
			
		||||
    exceptions:
 | 
			
		||||
 | 
			
		||||
    * The value of internalformat and format may be YCBCR_MESA to
 | 
			
		||||
      indicate that the image data is in YCbCr format.  type must
 | 
			
		||||
      be either UNSIGNED_SHORT_8_8_MESA or UNSIGNED_SHORT_8_8_REV_MESA
 | 
			
		||||
      as seen in tables 3.8 and 3.10.  Table 3.12 describes the mapping
 | 
			
		||||
      between Y and Cb/Cr to the components.
 | 
			
		||||
      If NV_texture_rectangle is supported target may also be
 | 
			
		||||
      TEXTURE_RECTANGLE_NV or PROXY_TEXTURE_RECTANGLE_NV.
 | 
			
		||||
      All pixel transfer operations are bypassed.  The texture is stored as
 | 
			
		||||
      YCbCr, not RGB.  Queries of the texture's red, green and blue component
 | 
			
		||||
      sizes will return zero.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    In section 3.8.1, Texture Image Specification, on page 126, add
 | 
			
		||||
    another item to the list of TexImage1D and TexImage2D equivalence
 | 
			
		||||
    exceptions:
 | 
			
		||||
 | 
			
		||||
    * The value of internalformat and format can not be YCBCR_MESA.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    In section 3.8.2, Alternate Texture Image Specification Commands, on
 | 
			
		||||
    page 129, insert this paragraph after the first full paragraph on the
 | 
			
		||||
    page:
 | 
			
		||||
 | 
			
		||||
         "If the internal storage format of the image being updated by
 | 
			
		||||
    TexSubImage2D is YCBCR_MESA then format must be YCBCR_MESA.
 | 
			
		||||
    The error INVALID_OPERATION will be generated otherwise."
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 4 of the OpenGL 1.4 Specification (Per-Fragment
 | 
			
		||||
Operations and the Frame Buffer)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 5 of the OpenGL 1.4 Specification (Special Functions)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 6 of the OpenGL 1.4 Specification (State and
 | 
			
		||||
State Requests)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to Appendix A of the OpenGL 1.4 Specification (Invariance)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to the AGL/GLX/WGL Specifications
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
GLX Protocol
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Errors
 | 
			
		||||
 | 
			
		||||
    INVALID_ENUM is generated by TexImage2D if <internalFormat> is
 | 
			
		||||
    MESA_YCBCR but <format> is not MESA_YCBCR.
 | 
			
		||||
 | 
			
		||||
    INVALID_ENUM is generated by TexImage2D if <format> is MESA_YCBCR but
 | 
			
		||||
    <internalFormat> is not MESA_YCBCR.
 | 
			
		||||
 | 
			
		||||
    INVALID_VALUE is generated by TexImage2D if <format> is MESA_YCBCR and
 | 
			
		||||
    <internalFormat> is MESA_YCBCR and <border> is not zero.
 | 
			
		||||
 | 
			
		||||
    INVALID_OPERATION is generated by TexSubImage2D if the internal image
 | 
			
		||||
    format is YCBCR_MESA and format is not YCBCR_MESA.
 | 
			
		||||
 | 
			
		||||
    INVALID_OPERATION is generated by CopyTexSubImage2D if the internal
 | 
			
		||||
    image is YCBCR_MESA.
 | 
			
		||||
    
 | 
			
		||||
New State
 | 
			
		||||
 | 
			
		||||
    Edit table 6.16 on page 231: change the type of TEXTURE_INTERNAL_FORMAT
 | 
			
		||||
    from n x Z42 to n x Z43 to indicate that internal format may also be
 | 
			
		||||
    YCBCR_MESA.
 | 
			
		||||
 | 
			
		||||
Revision History
 | 
			
		||||
 | 
			
		||||
    20 September 2002 - Initial draft
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
 | 
			
		||||
                     3Dfx Glide device driver for Mesa 3.1
 | 
			
		||||
                     3Dfx Glide device driver for Mesa 3.3
 | 
			
		||||
				(see below for FAQ)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
This software is distributed under the terms of the GNU Library
 | 
			
		||||
General Public License, see the LICENSE file for details.
 | 
			
		||||
Warning: this document is rather out of date, but most of the information
 | 
			
		||||
should still apply.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -189,9 +189,9 @@ Doing more with Mesa & Linux Glide:
 | 
			
		||||
	   quality. However you can use any visual depth supported by X.
 | 
			
		||||
 | 
			
		||||
	2. Set the following environment variables:
 | 
			
		||||
		export MESA_GLX_FX="window"	// to enable window rendering
 | 
			
		||||
		export SST_VGA_PASS=1	// to stop video signal switching
 | 
			
		||||
		export SST_NOSHUTDOWN=1	// to stop video signal switching
 | 
			
		||||
		export MESA_GLX_FX="window"	# to enable window rendering
 | 
			
		||||
		export SST_VGA_PASS=1	# to stop video signal switching
 | 
			
		||||
		export SST_NOSHUTDOWN=1	# to stop video signal switching
 | 
			
		||||
	    OR
 | 
			
		||||
		setenv MESA_GLX_FX window
 | 
			
		||||
		setenv SST_VGA_PASS 1
 | 
			
		||||
@@ -209,6 +209,9 @@ Doing more with Mesa & Linux Glide:
 | 
			
		||||
	visual depth doesn't match the Voodoo framebufffer bit per pixel, it
 | 
			
		||||
	is required also a pixel format translation).
 | 
			
		||||
 | 
			
		||||
	NOTE: the in-window rendering feature only works with double-buffering.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        On the fly switching between in window rendering and full screen rendering
 | 
			
		||||
	--------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
@@ -327,6 +330,11 @@ The Mesa/Voodoo Environment Variables:
 | 
			
		||||
		export MESA_FX_INFO=1
 | 
			
		||||
          you will get some useful statistic.
 | 
			
		||||
 | 
			
		||||
        - If you define the env. var. MESA_FX_NO_SIGNALS:
 | 
			
		||||
		export MESA_FX_NO_SIGNALS=1
 | 
			
		||||
          Mesa/FX will not install atexit() or signal() handlers.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Know BUGS and Problems:
 | 
			
		||||
-----------------------
 | 
			
		||||
@@ -541,9 +549,7 @@ No because the Linux Glide doesn't (yet) support the Voodoo Rush.
 | 
			
		||||
a binary copy of the Mesa in order to make the software
 | 
			
		||||
working out of the box ?
 | 
			
		||||
 | 
			
		||||
Yes, you have simply to include some informations about authors
 | 
			
		||||
and where the library sources are available (check the LICENSE
 | 
			
		||||
file for more informations about the GNU GPL).
 | 
			
		||||
Yes.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
11. Which is the best make target for compiling the Mesa for
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										141
									
								
								docs/README.BEOS
									
									
									
									
									
								
							
							
						
						
									
										141
									
								
								docs/README.BEOS
									
									
									
									
									
								
							@@ -1,102 +1,65 @@
 | 
			
		||||
Mesa-4.0.3 BeOS R5 driver patch
 | 
			
		||||
Version alpha v0.3
 | 
			
		||||
 | 
			
		||||
                         Mesa / BeOS Information
 | 
			
		||||
HOW TO BUILD:
 | 
			
		||||
 | 
			
		||||
1) You need gcc 2.95.3 to be installed: 
 | 
			
		||||
http://www.bebits.com/app/2157
 | 
			
		||||
Check your installed gcc version by running this command from a Terminal:
 | 
			
		||||
gcc -v
 | 
			
		||||
 | 
			
		||||
2) Download Mesa-4.0.3 sources 
 | 
			
		||||
http://prdownloads.sourceforge.net/mesa3d/MesaLib-4.0.3.tar.gz?download
 | 
			
		||||
 | 
			
		||||
Introduction
 | 
			
		||||
3) Extract official 4.0.3 sources code somewhere
 | 
			
		||||
 | 
			
		||||
Mesa 3.1 features a new driver for the BeOS.  The new driver implements
 | 
			
		||||
a clone of the BGLView class.  This class, derived from BView, allows
 | 
			
		||||
OpenGL rendering into a BeOS window.
 | 
			
		||||
4) Then, extract the BeOS driver patch at same place. This will 
 | 
			
		||||
overwrite modified sources and add BeOS-specific ones.
 | 
			
		||||
 | 
			
		||||
Any application which uses the BGLView should be able to use Mesa
 | 
			
		||||
instead of Be's OpenGL without changing any code.
 | 
			
		||||
5) Open a new Terminal window:
 | 
			
		||||
  $ cd /path/to/Mesa-4.0.3/src
 | 
			
		||||
  $ make -f Makefile.BeOS-R5
 | 
			
		||||
 | 
			
		||||
Since Be's OpenGL implementation (as of R4) is basically just the
 | 
			
		||||
SGI sample implementation, it's pretty slow.  You'll see that Mesa
 | 
			
		||||
is considerably faster.
 | 
			
		||||
6) Take a cup of coffee!
 | 
			
		||||
 | 
			
		||||
7) When done, you should find a obj.x86/libGL.so
 | 
			
		||||
 | 
			
		||||
8) To test this library as a Be Inc's one:
 | 
			
		||||
- rename /boot/beos/system/lib/libGL.so into libGL.so.r5
 | 
			
		||||
- put/copy obj.x86/libGL.so file into /boot/home/config/lib directory
 | 
			
		||||
- run GLTeapot...
 | 
			
		||||
 | 
			
		||||
Source Code
 | 
			
		||||
To see more information, run your(s) GL app(s) from Terminal:
 | 
			
		||||
  $ export MESA_INFO=1
 | 
			
		||||
  $ export MESA_DEBUG=1
 | 
			
		||||
  $ myGLapp
 | 
			
		||||
  MMX cpu detected.
 | 
			
		||||
  Not testing OS support for SSE, leaving enabled.
 | 
			
		||||
  SSE cpu detected.
 | 
			
		||||
  Mesa GL_VERSION = 1.2 Mesa 4.0.3
 | 
			
		||||
  Mesa GL_RENDERER = BGLView
 | 
			
		||||
  Mesa GL_VENDOR = Brian Paul
 | 
			
		||||
  Mesa GL_EXTENSIONS = GL_ARB_imaging GL_ARB_multitexture 
 | 
			
		||||
  [...]
 | 
			
		||||
  GL_SGIX_shadow GL_SGIX_shadow_ambient
 | 
			
		||||
  Mesa thread-safe: NO
 | 
			
		||||
  Mesa x86-optimized: YES
 | 
			
		||||
  Mesa sparc-optimized: NO    
 | 
			
		||||
 | 
			
		||||
The source code for the driver is in Mesa-3.1/src/BeOS/GLView.cpp
 | 
			
		||||
It's not 100% finished at this time but many GLUT-based demos are
 | 
			
		||||
working.  No optimizations have been made at this time.
 | 
			
		||||
BUILD ISSUES:
 | 
			
		||||
- If the build stop on math/m_*.c files, you're not using gcc 2.95.3.
 | 
			
		||||
- The Makefile.BeOS-R5 is set currently to build a non-debug x86/mmx/sse/3dnow optimized libGL.so.
 | 
			
		||||
It's a modified BeOS standard makefile, so editing it to follow your needs should be easy...
 | 
			
		||||
- NASM support instead of built-in gcc assembler (GAS) is not supported yet...
 | 
			
		||||
- "Mesa thread-safe: NO" is correct: the Mesa multithread support don't allow to share a gl context 
 | 
			
		||||
between any thread, only give you one thread <-> one context, which is inaccurate under BeOS...  
 | 
			
		||||
 | 
			
		||||
KNOWN LIMITATIONS & BUGS:
 | 
			
		||||
- BeOS driver only support software rendition ATM
 | 
			
		||||
- No BDirectWindow support yet, too. GLLife will not work for this reason.
 | 
			
		||||
- 3dnow support untested
 | 
			
		||||
- GLTeapot: object mouse control don't work
 | 
			
		||||
- GLTeapot: window resizing don't work
 | 
			
		||||
- many others: ALPHA VERSION, remember.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Compiling
 | 
			
		||||
 | 
			
		||||
Simply cd to the Mesa-3.x directory and type "make beos-r4".
 | 
			
		||||
When it finishes the libMesaGL.so and libMesaGLU.so libraries for
 | 
			
		||||
BeOS will be in the Mesa-3.x/lib/ directory.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Example Programs
 | 
			
		||||
 | 
			
		||||
Look in the Mesa-3.x/BeOS/ directory for one or two BGLView demo
 | 
			
		||||
programs.  They should have been compiled along with the Mesa
 | 
			
		||||
library.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
GLUT
 | 
			
		||||
 | 
			
		||||
A version of GLUT 2.5 for BeOS can be found in src-glut.beos/.
 | 
			
		||||
The original distribution can be obtained from
 | 
			
		||||
http://home.beoscentral.com/jehamby/Glut-3.5-x86.zip
 | 
			
		||||
 | 
			
		||||
This is a special version of GLUT adapted for the BeOS.  I don't
 | 
			
		||||
believe Mark Kilgard's normal GLUT distribution includes BeOS
 | 
			
		||||
support.
 | 
			
		||||
 | 
			
		||||
It seems that you have to recompile GLUT with libMesaGL.so instead
 | 
			
		||||
of libGL.so in order for everything to work.  I'm not sure why.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Special Features
 | 
			
		||||
 | 
			
		||||
Mesa's implementation of the BGLView class has an extra member
 | 
			
		||||
function:  CopySubBufferMESA().  It basically works like SwapBuffers()
 | 
			
		||||
but it only copies a sub region from the back buffer to the front
 | 
			
		||||
buffer.  This is a useful optimization for some applications.
 | 
			
		||||
If you use this method in your code be sure that you check at runtime
 | 
			
		||||
that you're actually using Mesa (with glGetString) so you don't
 | 
			
		||||
cause a fatal error when running with Be's OpenGL.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Work Left To Do
 | 
			
		||||
 | 
			
		||||
Color index mode is not implemented yet.
 | 
			
		||||
 | 
			
		||||
Reading pixels from the front buffer not implemented yet.
 | 
			
		||||
 | 
			
		||||
There is also a BGLScreen class in BeOS for full-screen OpenGL
 | 
			
		||||
rendering.  This should also be implemented for Mesa.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Old BeOS Driver
 | 
			
		||||
 | 
			
		||||
Mesa 2.6 had an earlier BeOS driver.  It was based on Mesa's Off-screen
 | 
			
		||||
rendering interface, not BGLView.  If you're interested in the older
 | 
			
		||||
driver you should get Mesa 2.6.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
BeOS and Glide
 | 
			
		||||
 | 
			
		||||
Mesa 3.0 supported the 3Dfx/Glide library on Beos.  Download Mesa 3.0
 | 
			
		||||
if interested.  Ideally, the 3Dfx/Glide support should be updated to
 | 
			
		||||
work with the new Mesa 3.1 BGLView implementation.
 | 
			
		||||
 | 
			
		||||
The Glide library hasn't been updated for BeOS R4, to my knowledge, as
 | 
			
		||||
of February, 1999.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: README.BEOS,v 1.5 1999/03/03 02:34:04 brianp Exp $
 | 
			
		||||
philippe.houdoin@free.fr
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										211
									
								
								docs/README.DJ
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										211
									
								
								docs/README.DJ
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,211 @@
 | 
			
		||||
			Mesa 4.0 DOS/DJGPP Port v1.1
 | 
			
		||||
			~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Description:
 | 
			
		||||
~~~~~~~~~~~~
 | 
			
		||||
 | 
			
		||||
Well, guess what... this is the DOS port of Mesa 4.0.4, for DJGPP fans... Whoa!
 | 
			
		||||
The driver has its origins in ddsample.c, written by Brian Paul and found by me
 | 
			
		||||
in Mesa 3.4.2.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Legal:
 | 
			
		||||
~~~~~~
 | 
			
		||||
 | 
			
		||||
Mesa copyright applies, provided this package is used within Mesa. For anything
 | 
			
		||||
else, see GPL.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Installation:
 | 
			
		||||
~~~~~~~~~~~~~
 | 
			
		||||
 | 
			
		||||
Unzip and type:
 | 
			
		||||
 | 
			
		||||
	make -f Makefile.DJ [OPTIONS...]
 | 
			
		||||
 | 
			
		||||
Available options:
 | 
			
		||||
 | 
			
		||||
     Environment variables:
 | 
			
		||||
	CPU		optimize for the given processor.
 | 
			
		||||
			default = k6
 | 
			
		||||
	BIG_OPT=1	crazy optimizations; not very useful, though...
 | 
			
		||||
			default = no
 | 
			
		||||
	GLIDE		absolute path to Glide library; used with FX.
 | 
			
		||||
			default = $(TOP)/include/glide3
 | 
			
		||||
	FX=1		build for 3dfx Glide3; use it if you have the Glide
 | 
			
		||||
			SDK (designed for your platform), and, of course, a
 | 
			
		||||
			3dfx card... Note that this disables compilation of
 | 
			
		||||
			actual DMesa code, as Glide does all the stuff!
 | 
			
		||||
			default = no
 | 
			
		||||
	HAVE_X86=1	optimize for i386.
 | 
			
		||||
			default = no
 | 
			
		||||
	HAVE_MMX=1	MMX instructions; use only if you assembler/compiler
 | 
			
		||||
			supports MMX instruction set; backwards compatibility
 | 
			
		||||
			with older processors is still preserved.
 | 
			
		||||
			default = no
 | 
			
		||||
	HAVE_SSE=1	(see HAVE_MMX)
 | 
			
		||||
			default = no
 | 
			
		||||
	HAVE_3DNOW=1	(see HAVE_MMX)
 | 
			
		||||
			default = no
 | 
			
		||||
 | 
			
		||||
     Targets:
 | 
			
		||||
	all:		build everything
 | 
			
		||||
	libgl:		build GL
 | 
			
		||||
	libglu:		build GLU
 | 
			
		||||
	libglut:	build GLUT
 | 
			
		||||
	clean:		remove object files
 | 
			
		||||
	realclean:	remove all generated files
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Tested on:
 | 
			
		||||
	CPU:		K6-2 (CXT) @500(412.5) MHz
 | 
			
		||||
	Mainboard:	ViA Apollo VP2/97 w/ 128 MB SDRAM
 | 
			
		||||
	Video card:	PowerColor Evil King3 (Voodoo3 3000) w/ 16384 kB SDRAM
 | 
			
		||||
	DJGPP:		djdev 2.03 + gcc v3.1 + make v3.79.1
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
FAQ:
 | 
			
		||||
~~~~
 | 
			
		||||
 | 
			
		||||
1. Compilation
 | 
			
		||||
 | 
			
		||||
   Q) I tried to run `make' and it exits because `gcc' complains it cannot find
 | 
			
		||||
      some stupid file.
 | 
			
		||||
   A) You need LFN support.
 | 
			
		||||
   A) When compiling for Glide (FX=1), pay attention to Glide path.
 | 
			
		||||
 | 
			
		||||
2. Dynamic modules
 | 
			
		||||
 | 
			
		||||
   Q) What are you mumbling about dynamic modules?
 | 
			
		||||
   A) You must have the DXE2 package (available on SimTel.Net, courtesy of
 | 
			
		||||
      Andrew Zabolotny) installed in order to build the dynamic modules.
 | 
			
		||||
 | 
			
		||||
   Q) I have DXE2, but I couln'd build the `dxe2gen.exe'.
 | 
			
		||||
   Q) I built `dxe2gen.exe', but it doesn't do the job right.
 | 
			
		||||
   A) There is a patched version on my web page.
 | 
			
		||||
 | 
			
		||||
   Q) DXE2 modules give me headaches...
 | 
			
		||||
   A) The DXE2 modules are not compulsory. The static libraries are still built
 | 
			
		||||
      and you can use them in the old-fashioned, classic way. For example:
 | 
			
		||||
	gcc -o OUT.exe IN.c -lglut -lglu -lgl
 | 
			
		||||
 | 
			
		||||
   Q) Okay, DXE2 modules are built. How can I use them?
 | 
			
		||||
   A) Usage of the dynamic modules requires three things:
 | 
			
		||||
	- include DMESADXE.H in one of the sources, so references inside
 | 
			
		||||
	  dynamic modules will get resolved (or use `-include' directive).
 | 
			
		||||
	- link against import libraries (libI*.a) and LIBDL.A, which will do
 | 
			
		||||
	  the dynamic linkage job for you
 | 
			
		||||
	- put the DXEs somewhere along the library path (LD_LIBRARY_PATH) or
 | 
			
		||||
	  in the current directory
 | 
			
		||||
      For example:
 | 
			
		||||
	gcc -o OUT.exe -include dmesadxe.h IN.c -ligl -liglu -liglut -ldl
 | 
			
		||||
 | 
			
		||||
   Q) The application dies with "Abort!" due to unresolved symbols.
 | 
			
		||||
   A) This is bad! Extract the unresolved symbol list from this module. For
 | 
			
		||||
      example:
 | 
			
		||||
	dxe2gen --show-unres gl.dxe > u
 | 
			
		||||
      Check DMESADXE.H; the symbols in `u' must either be present here or be
 | 
			
		||||
      exported from another module that has to be loaded before your faulting
 | 
			
		||||
      one. Then recompile.
 | 
			
		||||
 | 
			
		||||
3. Using Mesa for DJGPP
 | 
			
		||||
 | 
			
		||||
   Q) Does this build work in Win9x?
 | 
			
		||||
   A) Yes.
 | 
			
		||||
 | 
			
		||||
   Q) Does it work under NT (W2k, XP) core?
 | 
			
		||||
   A) Uh... probably not!
 | 
			
		||||
 | 
			
		||||
   Q) I made a simple application and it does nothing. It exits right away. Not
 | 
			
		||||
      even a blank screen.
 | 
			
		||||
   A) The current version supports only RGB[A] modes, for it made no sense to
 | 
			
		||||
      me to endorse color-index (aka palette) modes.
 | 
			
		||||
   A) Single-buffered is not allowed at all. Until I can find a way to use
 | 
			
		||||
      *REAL* hardware acceleration, it won't get implemented.
 | 
			
		||||
   A) Another weird "feature" is that buffer width must be multiple of 4 (I'm a
 | 
			
		||||
      lazy programmer and I found that the easiest way to keep buffer handling
 | 
			
		||||
      at peak performance ;-).
 | 
			
		||||
 | 
			
		||||
   Q) My demo doesn't display text. I know I used the glut font routines!
 | 
			
		||||
   A) Then you probably use GLUT as a DXE. Well, there is no direct access to
 | 
			
		||||
      variables due to the way DXE works. Read the documentation. The author of
 | 
			
		||||
      GLUT took this into account for _WIN32 DLL's only; I don't want to modify
 | 
			
		||||
      his headers. The only workaround is to link GLUT the old way :-(
 | 
			
		||||
 | 
			
		||||
   Q) The DJGPP port of Mesa is so SLOOOW! The Win32 OpenGL performs so much
 | 
			
		||||
      better...
 | 
			
		||||
   A) Is that a question? If you have a Voodoo3/Banshee card, you're lucky. The
 | 
			
		||||
      Glide port is on my web page. If you haven't, sorry; everything is done
 | 
			
		||||
      in software. Suggestions?
 | 
			
		||||
 | 
			
		||||
   Q) I have a super/mega/ultra monitor and all you can do is 60Hz? My eyes are
 | 
			
		||||
      leaking from the orbits...
 | 
			
		||||
   A) If you were compiling for Glide, see Glide info. If not, be aware that
 | 
			
		||||
      refresh rate control works only for VESA 3.0. The environment variable
 | 
			
		||||
      DMESA_REFRESH sets the default screen refresh. For example:
 | 
			
		||||
	set DMESA_REFRESH=75
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
libGLUT (the toolkit):
 | 
			
		||||
~~~~~~~~~~~~~~~~~~~~~~
 | 
			
		||||
 | 
			
		||||
Well, this "skeletal" GLUT implementation is not mine. Thanks should go to
 | 
			
		||||
Bernhard Tschirren, Mark Kilgard, Brian Paul and probably others (or probably
 | 
			
		||||
not ;-). I only changed it to be self-standing (Allegro-free). The keyboard,
 | 
			
		||||
mouse and timer drivers were inspired from an old project of mine (D3Xl) and
 | 
			
		||||
fixed with many Allegro "infusions"; I deeply thank to Shawn Hargreaves et co.
 | 
			
		||||
 | 
			
		||||
My keyboard driver used only scancodes, but since GLUT requires ASCII values
 | 
			
		||||
for keys, I borrowed the translation tables (and maybe more) from Allegro.
 | 
			
		||||
Ctrl-Alt-Del (plus Ctrl-Alt-End, for Windows users) will shut down the GLUT
 | 
			
		||||
engine unconditionally: it will raise SIGINT, which in turn will call the
 | 
			
		||||
destructors (let's hope), thus cleaning up your/my mess ;-) NB: since the
 | 
			
		||||
DJGPP guys ensured signal handlers won't go beyond program's space (and since
 | 
			
		||||
dynamic modules shall) the SIGINT can't be hooked (well, it can, but it is
 | 
			
		||||
useless), therefore you must live with the 'Exiting due to signal SIGINT'
 | 
			
		||||
message...
 | 
			
		||||
 | 
			
		||||
The mouse driver is far from complete (lack of positioning, drawing, etc),
 | 
			
		||||
but is enough to make almost all the demos work.
 | 
			
		||||
 | 
			
		||||
The timer is pretty versatile for it supports multiple timers with different
 | 
			
		||||
frequencies. It may not be the most accurate timer in the known universe, but
 | 
			
		||||
I think it's OK. Take this example: you have timer A with a very high rate,
 | 
			
		||||
and then you have timer B with very low rate compared to A; now, A ticks OK,
 | 
			
		||||
but timer B will probably loose precision!
 | 
			
		||||
 | 
			
		||||
As an addition, stdout and stderr are redirected and dumped upon exit. This
 | 
			
		||||
means that printf can be safely called during graphics, but all messages come
 | 
			
		||||
in bulk! A bit of a hack, I know, but I think it's better than to miss them
 | 
			
		||||
at all. "Borrowed" from RHIDE (Robert Hoehne) or SETEDIT (Salvador Eduardo
 | 
			
		||||
Tropea)... I'm not sure.
 | 
			
		||||
 | 
			
		||||
Window creating defaults: 640x480x16 at (0,0), 8-bit stencil, 16-bit accum.
 | 
			
		||||
However, the video mode is chosen in such a way that first window will fit.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
History:
 | 
			
		||||
~~~~~~~~
 | 
			
		||||
 | 
			
		||||
v1.0	mar-2002	initial release
 | 
			
		||||
v1.1	sep-2002	+ added 3dfx Glide3 support
 | 
			
		||||
			+ added refresh rate control
 | 
			
		||||
			+ added fonts in glut
 | 
			
		||||
			* lots of minor changes
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Contact:
 | 
			
		||||
~~~~~~~~
 | 
			
		||||
 | 
			
		||||
Name:   Borca Daniel
 | 
			
		||||
E-mail: dborca@yahoo.com
 | 
			
		||||
WWW:    http://www.geocities.com/dborca/
 | 
			
		||||
@@ -1,120 +1,50 @@
 | 
			
		||||
August 30, 1998 -- Paul Garceau (pgarceau@teleport.com)
 | 
			
		||||
August 30, 1998 -- Paul Garceau
 | 
			
		||||
Updated January 13, 2000 -- Paul Garceau (pgarceau@teleport.com)
 | 
			
		||||
 | 
			
		||||
DISCLAIMER:  I make this extension to the Mesa 3-D Graphics Library as a service
 | 
			
		||||
DISCLAIMER:  I make this port of the Mesa 3-D Graphics Library as a service
 | 
			
		||||
to the general public.  I can, in no way support or make any guarantee that the
 | 
			
		||||
EGCS-Mingw32 build or any Gnu-Win32 build will work for your system. The
 | 
			
		||||
associated packages and batch files I have included as part of the EGCS-Mingw32
 | 
			
		||||
extension are provided "As-is" with out any guarantee of support or functionality
 | 
			
		||||
from the author of this EGCS-Mingw32 native windows port of the Mesa 3-D Graphics
 | 
			
		||||
Library.
 | 
			
		||||
build will work for your system.
 | 
			
		||||
 | 
			
		||||
	The associated packages and batch files I have included as part of the GCC-2.95.2/Mingw32 extension are provided "As-is" with out any guarantee of support or functionality from this author.
 | 
			
		||||
 | 
			
		||||
	Feel free to modify or change things as you see fit, just remember that
 | 
			
		||||
I can't support any modifications you might want to make to the files which I
 | 
			
		||||
have included OR the lgpl protected Mesa 3-D Graphics Library.
 | 
			
		||||
 | 
			
		||||
	I recommend using GCC-2.95.2/Mingw32 which is available at Mumit Khans' ftp site:
 | 
			
		||||
 | 
			
		||||
	EGCS-Mingw32 Beta 3.08 Archive Manifest:
 | 
			
		||||
		mingw32.bat
 | 
			
		||||
		src/makefile.nt4
 | 
			
		||||
		src/wmesa.c
 | 
			
		||||
		src-glu/makefile.nt4
 | 
			
		||||
		(ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/)
 | 
			
		||||
 | 
			
		||||
###############
 | 
			
		||||
	This build has been tested under WinNT4/SP6.  Win9x and WinNT5 remain untested by me.  I have not tested any of the demos included with Mesa3d.
 | 
			
		||||
 | 
			
		||||
Greetings,
 | 
			
		||||
	I recommend using the GCC-2.95.2/Mingw32.
 | 
			
		||||
 | 
			
		||||
	In order to build the Mingw32 set of Mesa 3-D Graphics Library for Beta3.08
 | 
			
		||||
it will be necessary for you to use the Dos or Command Prompt that is available
 | 
			
		||||
on most of the i86 based MS Windows machines.  Also, I believe that this build
 | 
			
		||||
will run on Win95, Win98, WinNT4 and WinNT5.
 | 
			
		||||
 | 
			
		||||
	I haven't tested Win95/98 or WinNT5.  This build was generated under
 | 
			
		||||
WinNT4 with SP3 installed.
 | 
			
		||||
 | 
			
		||||
	This has not been tested under any systems outside of
 | 
			
		||||
a WinNT4 Workstation with EGCS-Mingw32 toolchain, v.1.0.2 installed.
 | 
			
		||||
 | 
			
		||||
	EGCS-Mingw32 uses a variation of gcc to handle its build.  The Mesa 3-D
 | 
			
		||||
Graphics Library build that I have generated is based, in small part, on the
 | 
			
		||||
Cygwin32 build and associated makefiles that Stephane Rehel (rehel@worldnet.fr)
 | 
			
		||||
defined back in 1997.  The EGCS-Mingw32 toolchain is capable of generating
 | 
			
		||||
native windows code and, as of the date of this readme, can be obtained from:
 | 
			
		||||
 | 
			
		||||
	http://www.xraylith.wisc.edu/~khan/software/gnu-win32/egcs-mingw32-102.html
 | 
			
		||||
	ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/gcc-2.95.2
 | 
			
		||||
 | 
			
		||||
	Much thanks to the combined efforts of Mumit Khan, Jan-Jaap Vanderhagen
 | 
			
		||||
and Colin Peters for making it possible for the EGCS-Mingw32 toolchain to exist.
 | 
			
		||||
and Colin Peters for making it possible for the Mingw32 toolchain to exist.  Also, thanks go out to Stephane Rehel for the work that was completed on the Cygwin build.
 | 
			
		||||
 | 
			
		||||
Installing EGCS-Mingw32 Build Revisions:
 | 
			
		||||
Installing GCC-2.95.2/Mingw32 Build:
 | 
			
		||||
 | 
			
		||||
	To install the makefile and source revisions incorporated with this build
 | 
			
		||||
of the Mesa 3-D Graphics Library, you'll have to use a version of winzip.  I am
 | 
			
		||||
in the process of finding a suitable Win32 compatible tar executable so that if
 | 
			
		||||
you don't have winzip, you can still decompress the files into their respective
 | 
			
		||||
folders/directories.
 | 
			
		||||
	a) Open the file archive (either tar.gz or .zip extensions)
 | 
			
		||||
 | 
			
		||||
	a) Move the mingw32.zip file to the top level of the hard drive on your
 | 
			
		||||
system.
 | 
			
		||||
	b) Decide the directory you want to move the archived files to.
 | 
			
		||||
 | 
			
		||||
	b) Copy all of the Beta 3.08 src/windows files to the src/ directory.
 | 
			
		||||
	d) Extract the files from the archive.
 | 
			
		||||
	
 | 
			
		||||
	e) Edit the mingw32.bat file to accomodate your choice of directory structure.
 | 
			
		||||
 | 
			
		||||
	b) Open the Winzip file
 | 
			
		||||
 | 
			
		||||
	c) Verify that the files will be properly extracted.
 | 
			
		||||
 | 
			
		||||
	d) Extract the files with the Winzip "Overwrite" and "Use Folder Names"
 | 
			
		||||
	   options enabled.
 | 
			
		||||
 | 
			
		||||
	The zip file directory structure extraction defaults to the top level of
 | 
			
		||||
the hard drive where the mingw32.zip file exists unless otherwise instructed by
 | 
			
		||||
you.
 | 
			
		||||
 | 
			
		||||
	The version of wmesa.c included with the mingw32 archive needs to replace
 | 
			
		||||
the current version of the Beta 3.08 wmesa.c file in order for the egcs-mingw32
 | 
			
		||||
build to work.  This is because the original Win32 stuff assumes that the glut
 | 
			
		||||
utilities are to be installed.  The Glut utilities are not part of the
 | 
			
		||||
egcs-mingw32 build for Beta 3.08.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Build Considerations:
 | 
			
		||||
 | 
			
		||||
	In order to get the build to work, I needed to create a special makefile
 | 
			
		||||
for each library which the Mesa 3-D Graphics Library requires since there is no
 | 
			
		||||
comparable make-config/config on a native windows platform.
 | 
			
		||||
 | 
			
		||||
	Since I was only creating a few of the possible libraries for 
 | 
			
		||||
Mesa (gl, glu), I only created the new make files in their respective libraries
 | 
			
		||||
src, src-glu).  For libMesaaux.a. you will find a makefile for it in the
 | 
			
		||||
src-aux directory.  libMesatk.a and libglut.a were not ported.
 | 
			
		||||
 | 
			
		||||
	The build itself is a .bat based build and uses Gnu Make,Version 3.76.1 to
 | 
			
		||||
process the makefiles noted above.  The build must be run from the directory
 | 
			
		||||
where the mingw32.bat file is.  You can get the binary version of Make 3.76.1
 | 
			
		||||
from Jan-Jaap van der Heijden's site in Germany:
 | 
			
		||||
 | 
			
		||||
	http://agnes.dida.physik.uni-essen.de/~janjaap/mingw32/download.html
 | 
			
		||||
 | 
			
		||||
	It was necessary to modify some source code, specifically the source code
 | 
			
		||||
in the src-glu directory.  I needed to modify nurbs.c, quadric.c and tess.c in
 | 
			
		||||
order to get them to work using the EGCS-Mingw32 toolchain.
 | 
			
		||||
 | 
			
		||||
	The original EGCS-Mingw32 Toolchain, is available from:
 | 
			
		||||
 | 
			
		||||
	http://www.xraylith.wisc.edu/~khan/software/gnu-win32/egcs-mingw32-102.html	
 | 
			
		||||
		%mesaroot%:	This is your root directory (Mesa-3.3)
 | 
			
		||||
		%mesasrc%:	This is the Mesa-3.3 src directory (Mesa-3.3\src)
 | 
			
		||||
		%mesalib%:	This is where the build will put libGL.a and libGLU.a
 | 
			
		||||
 | 
			
		||||
Running the Build:
 | 
			
		||||
 | 
			
		||||
	Ok, now that we've got the basics out of the way, follows is all you need
 | 
			
		||||
to do in order to build the EGCS-Mingw32 version of libMesaGL.a and libMesaGLU.a:
 | 
			
		||||
 | 
			
		||||
	Open your Command Prompt/Dos prompt.
 | 
			
		||||
	Go to your Mesa-3.0 beta 'root' directory.
 | 
			
		||||
		This is the same directory that the Mesa mingw32.zip file was
 | 
			
		||||
		originally stored in if you've installed the Mesa-3.0 beta 3-D
 | 
			
		||||
		Graphics Library source as outlined in the "readme" file included
 | 
			
		||||
		with the Mesa-3.0 beta distribution.
 | 
			
		||||
	Open your Command Prompt or MS-DOS prompt.
 | 
			
		||||
	Go to your Mesa-3.3 'root' directory
 | 
			
		||||
	At the command line type: mingw32
 | 
			
		||||
		mingw32 is the .bat file that actually does the build.
 | 
			
		||||
 | 
			
		||||
	That's all there is to it.
 | 
			
		||||
 | 
			
		||||
	Enjoy!
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,45 +1,33 @@
 | 
			
		||||
 | 
			
		||||
NOTE: this information is obsolete for Mesa 3.1.  Due to the big
 | 
			
		||||
changes in the Mesa code, the threads support is out of date.
 | 
			
		||||
Someone will have to review/update it.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Mesa Threads README
 | 
			
		||||
-------------------
 | 
			
		||||
 | 
			
		||||
Mesa 2.6 is the starting point for an effort to make Mesa 
 | 
			
		||||
safe in multithreaded applications.  The files src/mthreads.c and
 | 
			
		||||
src/mthreads.h provide a platform independent threads API which Mesa
 | 
			
		||||
uses internally to provide thread-safe operation.  At present the mthreads
 | 
			
		||||
code supports three thread APIS:
 | 
			
		||||
Thread safety was introduced in Mesa 2.6 by John Stone and
 | 
			
		||||
Christoph Poliwoda.
 | 
			
		||||
 | 
			
		||||
It was redesigned in Mesa 3.3 so that thread safety is
 | 
			
		||||
supported by default (on systems which support threads,
 | 
			
		||||
that is).  There is no measurable penalty on single
 | 
			
		||||
threaded applications.
 | 
			
		||||
 | 
			
		||||
NOTE that the only _driver_ which is thread safe at this time
 | 
			
		||||
is the OS/Mesa driver!
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
At present the mthreads code supports three thread APIS:
 | 
			
		||||
  1) POSIX threads (aka pthreads).
 | 
			
		||||
  2) Solaris / Unix International threads.
 | 
			
		||||
  3) Win32 threads (Win 95/NT).
 | 
			
		||||
 | 
			
		||||
Here's the current list of targets which enable multithreaded handling
 | 
			
		||||
in Mesa:
 | 
			
		||||
Support for other thread libraries can be added src/glthread.[ch]
 | 
			
		||||
 | 
			
		||||
  linux-386-pthread    for Linux w/ Intel assembly and linuxthreads
 | 
			
		||||
  sunos5-thread        for Suns with SunOS 5.x, using Solaris threads
 | 
			
		||||
  sunos5-pthread       for Suns with SunOS 5.[56] using POSIX threads
 | 
			
		||||
  sunos5-gcc-thread    for Suns with SunOS 5.x and GCC, using Solaris threads
 | 
			
		||||
  sunos5-gcc-pthread   for Suns with SunOS 5.[56] and GCC, using POSIX threads
 | 
			
		||||
 | 
			
		||||
In order to use Mesa with a multithreaded application, Mesa must be compiled
 | 
			
		||||
using one of the thread-enabled configurations.  In cases where a platform
 | 
			
		||||
supports multiple APIs which are acceptable to Mesa, Mesa must be built
 | 
			
		||||
with the same threads API as the application in order for things to work
 | 
			
		||||
properly.  For example, Solaris >= 2.5 support both POSIX threads and
 | 
			
		||||
Sun's own threads API.  In order to guarantee proper operation, it is
 | 
			
		||||
In order to guarantee proper operation, it is
 | 
			
		||||
necessary for both Mesa and application code to use the same threads API.
 | 
			
		||||
So, if your application uses Sun's thread API, then you should build Mesa
 | 
			
		||||
using one of the targets for Sun threads.
 | 
			
		||||
 | 
			
		||||
Since this effort is still very much a work in progress, not all 
 | 
			
		||||
aspects of Mesa are thread safe.  As of this release (Mesa 2.6) only the
 | 
			
		||||
osmesa drivers have been made MT-safe.  As work continues, other drivers
 | 
			
		||||
such as the X11 drivers will also incorporate MT-safe features.
 | 
			
		||||
 | 
			
		||||
The mtdemos directory contains some example programs which use 
 | 
			
		||||
multiple threads to render to osmesa rendering context(s).
 | 
			
		||||
 | 
			
		||||
@@ -50,17 +38,15 @@ only one that really supports multiprocessor machines (AFAIK). See
 | 
			
		||||
http://pauillac.inria.fr/~xleroy/linuxthreads/README for further
 | 
			
		||||
information about the usage of linuxthreads.
 | 
			
		||||
 | 
			
		||||
If you are interested in helping develop MT-safe Mesa, please send email
 | 
			
		||||
to j.stone@acm.org and poliwoda@volumegraphics.com who are the two most
 | 
			
		||||
directly involved in this effort currently.  Similarly, if you have problems
 | 
			
		||||
using the MT-safe builds of Mesa, please send us comments/bugs etc.
 | 
			
		||||
If you are interested in helping with thread safety work in Mesa
 | 
			
		||||
join the Mesa developers mailing list and post your proposal.
 | 
			
		||||
 | 
			
		||||
Future versions of Mesa will include more extensive documentation related
 | 
			
		||||
to multithreading.  This is the first release of our work, so please bear
 | 
			
		||||
with us.
 | 
			
		||||
 | 
			
		||||
Regards,
 | 
			
		||||
  John Stone           -- j.stone@acm.org  johns@cs.umr.edu
 | 
			
		||||
  Christoph Poliwoda   -- poliwoda@volumegraphics.com
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Version info:
 | 
			
		||||
   Mesa 2.6 - initial thread support.
 | 
			
		||||
   Mesa 3.3 - thread support mostly rewritten (Brian Paul)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,623 +1,92 @@
 | 
			
		||||
 | 
			
		||||
    Mesa/Readme.win32
 | 
			
		||||
 | 
			
		||||
    Last Updated: Sunday, September 19th, 1999 - tjump@tertius.com
 | 
			
		||||
 | 
			
		||||
*** What's New
 | 
			
		||||
 | 
			
		||||
- Updated for Mesa 3.1beta3/CVS. Debug and Release command-line builds of
 | 
			
		||||
  Mesa, fxMesa, GLU, GLUT and all sample programs DLL-based. Manual
 | 
			
		||||
  executions tests with minimum requisite results (aka: things looked like
 | 
			
		||||
  I expected them to).
 | 
			
		||||
 | 
			
		||||
  What did you expect, complete regression testing maybe?
 | 
			
		||||
 | 
			
		||||
- NASM build support. Any file in the project coded as a .S file will
 | 
			
		||||
  automatically be recognized and built as a NASM-source assember file.
 | 
			
		||||
 | 
			
		||||
  To enable building using NASM, set the environment variable NASM to
 | 
			
		||||
  indicate that command to execute to run nasm on a file. If NASM is in
 | 
			
		||||
  your command search path then all this needs be set to is 'nasmw' -
 | 
			
		||||
  otherwise you will need to include the complete drive and directory path.
 | 
			
		||||
 | 
			
		||||
  NASM may be retrieved here: http://www.web-sites.co.uk/nasm/
 | 
			
		||||
 | 
			
		||||
- DevStudio projects suspended for compatability reasons: projects modified
 | 
			
		||||
  by DevStudio 6 are not compatible with DevStudio 5.
 | 
			
		||||
 | 
			
		||||
  These will slowly be rebuilt and put into CVS as I can.
 | 
			
		||||
 | 
			
		||||
- Build environment change: The Glide SDK is no longer assumed to be in
 | 
			
		||||
  the global INCLUDE/LIB environment vars, it is required that you set the
 | 
			
		||||
  value 'GLIDE2X' as either an environment variable pointing to your Glide
 | 
			
		||||
  SDK install directory or that you configure that as a build option to
 | 
			
		||||
  nmake.exe when building fxmesagl32.  Examples:
 | 
			
		||||
 | 
			
		||||
    nmake /f nmake.mak GLIDE2X=g:\sdk\glide2x fxmesagl32
 | 
			
		||||
 | 
			
		||||
          <or>
 | 
			
		||||
 | 
			
		||||
    nmake /f nmake.mak GLIDE2X=g:\sdk\glide2x allfx
 | 
			
		||||
 | 
			
		||||
          <or>
 | 
			
		||||
 | 
			
		||||
    nmake /f nmake.mak GLIDE2X=g:\sdk\glide2x progs.3dfx.demos
 | 
			
		||||
 | 
			
		||||
  The DevStudio workspace files for 3Dfx OpenGL require the definition of
 | 
			
		||||
  GLIDE2SDK as an environment variable pointing to where your copy of the
 | 
			
		||||
  Glide SDK has been installed. Adding this to your AUTOEXEC.BAT would do
 | 
			
		||||
  so (change the directories to match):
 | 
			
		||||
 | 
			
		||||
       SET GLIDE2SDK=G:\SDK\GLIDE2X
 | 
			
		||||
 | 
			
		||||
*** Legalese
 | 
			
		||||
 | 
			
		||||
These build files are provided as-is and are submitted to be included with
 | 
			
		||||
the "Mesa 3-D Graphics Library" package as (currently) maintained by Brian
 | 
			
		||||
Paul. These project build files are free software; you can redistribute it
 | 
			
		||||
and/or modify it under the terms of the GNU Library General Public License
 | 
			
		||||
as published by the Free Software Foundation; either version 2 of the
 | 
			
		||||
License, or (at your option) any later version.
 | 
			
		||||
 | 
			
		||||
These project files are distributed in the hope that they will be useful,
 | 
			
		||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library
 | 
			
		||||
General Public License for more details.
 | 
			
		||||
 | 
			
		||||
You should have received a copy of the GNU Library General Public License
 | 
			
		||||
along with this library; if not, write to the Free Software Foundation,
 | 
			
		||||
Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 | 
			
		||||
 | 
			
		||||
*** Maintenance Responsiblity and Technical Support
 | 
			
		||||
 | 
			
		||||
While these files are now part of the Mesa core distribution please do NOT
 | 
			
		||||
contact Mr. Paul for help with them if you encounter problems as he can't
 | 
			
		||||
help you (currently).  I will, however, attempt my straightforward best in
 | 
			
		||||
assisting anyone with using these files on their system.  I can NOT
 | 
			
		||||
guarantee instant responses owing to other responsiblities, but I do try
 | 
			
		||||
dang hard to answer any mail w/in 24 hours.  I may be contacted at the
 | 
			
		||||
above email address for the forseeable future.
 | 
			
		||||
 | 
			
		||||
-Ted
 | 
			
		||||
mailto://tjump@tertius.com
 | 
			
		||||
http://www.tertius.com/tjump
 | 
			
		||||
 | 
			
		||||
*** General Information
 | 
			
		||||
 | 
			
		||||
These build files facilitate convenient building of many variants of Mesa,
 | 
			
		||||
both as static link libraries (including mesaglu) and as dynamic link
 | 
			
		||||
libraries that in some cases may be used as "drop-in" replacements for
 | 
			
		||||
OpenGL32.DLL on both Windows95 and Windows NT.
 | 
			
		||||
 | 
			
		||||
The construction of the Win32 command-line build files and projects has
 | 
			
		||||
been something of a pet project of mine, and is based upon my own
 | 
			
		||||
"standard" Win32 build environment as supplied by the "nmake.mif" file.
 | 
			
		||||
They have been tested under Windows95 OSR2, Windows NT 4.0SP3, and Windows
 | 
			
		||||
NT 5.0 beta 1.  The libraries that they generated have been tested (via the
 | 
			
		||||
demo programs) in a *limited* fashion on the above three systems, including
 | 
			
		||||
the 3Dfx versions.
 | 
			
		||||
 | 
			
		||||
The reason I went with command-line build environment instead of the more
 | 
			
		||||
convenient IDE-based project files is for two reasons: 1. These appear to
 | 
			
		||||
have some amount of portability between versions (the nmake syntax hasn't
 | 
			
		||||
changed much since Microsoft C 7.0) while the IDE project files seem to
 | 
			
		||||
change drastically each version. and 2. These are readable with any ascii
 | 
			
		||||
editor and such are better self-documentation of the file relationships for
 | 
			
		||||
more people such that it will facilitate supporting other Win32 compilers.
 | 
			
		||||
 | 
			
		||||
While these files only deal with building for x86 targeted code it *should*
 | 
			
		||||
be possible to add the necessary logic to them to build for the other MSVC
 | 
			
		||||
supported CPU targets, I simply have no hardware to test them on nor the
 | 
			
		||||
alternative compilers to build with.
 | 
			
		||||
 | 
			
		||||
*** Prerequisites for use
 | 
			
		||||
 | 
			
		||||
1. You must have a 32-bit Microsoft compiler installed. I have tested
 | 
			
		||||
this with Visual C 5.0 (SP3) and Visual C 4.2, but with minor
 | 
			
		||||
(possibly no) modification to the nmake.mak and nmake.mif files this
 | 
			
		||||
sequence should work on Visual C 2.0 also. The workspace files
 | 
			
		||||
(mesalib.dsw and mesademos-*.dsw) and their included project files
 | 
			
		||||
(*.dsp) are specific to the DevStudio IDE - I have made no attempt at
 | 
			
		||||
building a VC4 IDE project set as I do not use that any more.  Note
 | 
			
		||||
that the VC workspace files NO LONGER use NORE are dependant upon the
 | 
			
		||||
nmake.mak and nmake.mif files for construction of definition (*.DEF)
 | 
			
		||||
and resource (*.RC) files.
 | 
			
		||||
 | 
			
		||||
*** Visual C 4.x Users Warning ****
 | 
			
		||||
 | 
			
		||||
Note that early editions of VC4 do NOT have header files current enough
 | 
			
		||||
for use building this code base. If you are using VC4 you will either need
 | 
			
		||||
to get an update to version 4.2 *or* you may download the Platform SDK
 | 
			
		||||
directly from Microsoft's web site (www.microsoft.com) and update your
 | 
			
		||||
build environment that way.
 | 
			
		||||
 | 
			
		||||
*** Visual C 4.x Users Warning ****
 | 
			
		||||
 | 
			
		||||
2. You must have the PATH, INCLUDE, and LIB environment variables set
 | 
			
		||||
properly. With VC5 you can easily get this by executing the VCVARS32.BAT
 | 
			
		||||
file that was created for you upon installation. It is found in the
 | 
			
		||||
DevStudio\VC\BIN directory, wherever you installed DevStudio. VC4 provides
 | 
			
		||||
a similar batch file in it's BIN directory also.
 | 
			
		||||
 | 
			
		||||
3. (optional) If you're going to build for 3Dfx/Voodoo you will need to
 | 
			
		||||
have previously installed the Glide SDK version 2.3 or later, if I
 | 
			
		||||
recall. This may be retrieved from www.3dfx.com for no money and some
 | 
			
		||||
download time. ;-) These build files assume that you have the Glide SDK
 | 
			
		||||
added to the respective environment variables (LIB and INCLUDE).
 | 
			
		||||
 | 
			
		||||
4. (optional) If you're going to build for S3/Virge you will need the S3
 | 
			
		||||
Developers Toolkit which may be downloaded from www.s3.com for the price of
 | 
			
		||||
registering on-line and some time. NOTE: I can build the s3mesa.dll file to
 | 
			
		||||
completion, however the compilation of s3mesa.c currently generates a large
 | 
			
		||||
amount of compiler warnings and between that and the fact that I can not at
 | 
			
		||||
all test it I can make no claims to it's ability to execute.  Again, like
 | 
			
		||||
the 3Dfx version before this, these build files assume you have the S3Dtk H
 | 
			
		||||
and LIB files in the path of their respective environment variables.
 | 
			
		||||
Note 2: As of Mesa3.0beta6 I have build files, both command-line and IDE,
 | 
			
		||||
which should be able to build the s3mesa code base if it weren't for updates
 | 
			
		||||
being required in the S3 DD code support (Mesa-3.0/src/s3 directory).
 | 
			
		||||
 | 
			
		||||
I advise putting any include and lib files for secondary toolkits (Glide,
 | 
			
		||||
S3Tk, whatever) in their respective environment variables *before* the
 | 
			
		||||
Microsoft-assigned default values.
 | 
			
		||||
 | 
			
		||||
*** FAQ: Frequenty Asked Questions and Other Important Information ***
 | 
			
		||||
 | 
			
		||||
- When running the 3Dfx demos under Windows NT, they crash on exit, what's
 | 
			
		||||
  up?
 | 
			
		||||
 | 
			
		||||
  This is apparently a problem in Glide itself. The workaround is to go to
 | 
			
		||||
  your C:\WINNT\SYSTEM32 directory and rename the file FXOEM2X.DLL to
 | 
			
		||||
  FXOEM2X.DL_ to prevent Glide from loading and initializing it upon
 | 
			
		||||
  startup.  This is known to be an issue with cards that do not have "TV
 | 
			
		||||
  out" and is known to cause crashes on Diamond Monster II 8M and 3Dfx
 | 
			
		||||
  Reference boards, all using 3Dfx Reference Drivers version 2.53. Other
 | 
			
		||||
  hardware/driver combinations will also likely exhibit this behavior.
 | 
			
		||||
 | 
			
		||||
- I'm having a problem building Mesa for static library linking.
 | 
			
		||||
 | 
			
		||||
  This was caused by some incomplete testing on my part, and a fix is now
 | 
			
		||||
  available in the form of an add-on to the base Mesa 3.0 release.  The
 | 
			
		||||
  file to get is:
 | 
			
		||||
 | 
			
		||||
       via FTP download from: iris.ssec.wisc.edu
 | 
			
		||||
         you want to go here: /pub/Mesa/patches_to_3.0/
 | 
			
		||||
        you want to get file: Mesa-3.0-w32-static-fixes.tar.gz
 | 
			
		||||
 | 
			
		||||
  This required a minor addition to INCLUDE/GL for a clean solution, the
 | 
			
		||||
  file "include/gl/mesa_wgl.h" is automatically included by
 | 
			
		||||
  "include/gl/gl.h" when a Win32 non-DLL build is in progress to provide
 | 
			
		||||
  prototypes for the various wgl functions.
 | 
			
		||||
 | 
			
		||||
  The only remaining hitch in this setup is that the 3Dfx build is not yet
 | 
			
		||||
  running as a static build, because of problems with conflicts in
 | 
			
		||||
  existance of the various GDI functions like ChoosePixelFormat,
 | 
			
		||||
  etc. *sigh*
 | 
			
		||||
 | 
			
		||||
  Anyway, the "allstatic" target now works as expected and builds all
 | 
			
		||||
  book/sample/demos programs to boot. ;^)
 | 
			
		||||
 | 
			
		||||
- How do I get fxMesa to render in a window on the desktop instead of only
 | 
			
		||||
  full-screen?
 | 
			
		||||
 | 
			
		||||
  Use the Microsoft Windows fxMesa-in-a-window hack!
 | 
			
		||||
 | 
			
		||||
  Seriously, if you want fxMesaGL to render using the 3Dfx Voodoo1 or
 | 
			
		||||
  Voodoo2 hardware into a window on the desktop then all you need to do is
 | 
			
		||||
  set the MESA_WGL_FX environment variable to anything other than
 | 
			
		||||
  "fullscreen" and it will render into a window.  If you wish to go
 | 
			
		||||
  fullscreen then you only need to NOT have the environment variable, or
 | 
			
		||||
  have it set to "fullscreen".  You may also switch at runtime between
 | 
			
		||||
  fullscreen-mode and windowed by pressing ALT-ENTER on the keyboard
 | 
			
		||||
  (unless the application using Mesa does something with those keystrokes,
 | 
			
		||||
  of course).
 | 
			
		||||
 | 
			
		||||
  As of 8/13/98 this should be running a LOT better for more people as a
 | 
			
		||||
  low-compatability item was cleaned up which prevented it from working on
 | 
			
		||||
  many (most?) display drivers under Windows 9x.
 | 
			
		||||
 | 
			
		||||
- I have my 3Dfx card hooked to it's own monitor and I want the output to
 | 
			
		||||
  stay on even if I switch to another program, is this possible?
 | 
			
		||||
 | 
			
		||||
  If the Glide environment variable SST_DUALHEAD is set to '1' then fxMesa
 | 
			
		||||
  will never disable the Voodoo output on a Voodoo1 or Voodoo2 display
 | 
			
		||||
  regardless of whether the fxMesa application is "current" or not. This
 | 
			
		||||
  works regardless of whether it's rendering using the window hack
 | 
			
		||||
  mentioned above or not.
 | 
			
		||||
 | 
			
		||||
- I want to run the Mesa demos on my Intel740 card using it's own OpenGL
 | 
			
		||||
  acceleration, how do I do this?
 | 
			
		||||
 | 
			
		||||
  Build GLUT standalone for use with system OpenGL and GLU drivers!
 | 
			
		||||
 | 
			
		||||
  The Command-line project supports building all test/demo programs against
 | 
			
		||||
  these drivers also! This allows you full use of GLUT on Windows using
 | 
			
		||||
  hardware accelerated OpenGL. Wheee! This includes the "3dfx/demos"
 | 
			
		||||
  directory of which only two programs will not run on "standard"
 | 
			
		||||
  opengl. Note that there are a few of the sample programs which will NOT
 | 
			
		||||
  work without Mesa as they directly call into Mesa instead of using the
 | 
			
		||||
  extension mechanism.
 | 
			
		||||
 | 
			
		||||
*** Included programs that exhibit unfortunate or bad behavior
 | 
			
		||||
 | 
			
		||||
- demos/bounce - doesn't run on high-colors screens?  It's requesting an
 | 
			
		||||
  INDEX display from GLUT and that fails on my true-color desktop. Changing
 | 
			
		||||
  this to _RGB let's the program work, but it doesn't display
 | 
			
		||||
  properly. This is probably just an idiosyncracy of my machine though, as
 | 
			
		||||
  if I test the program using GLUT for System OpenGL on my Intel740 OpenGL
 | 
			
		||||
  accelerated machine it's just hunky-dory.
 | 
			
		||||
 | 
			
		||||
- demos/glutfx - runs, but crashes on exit (but not on my Intel740 machine)
 | 
			
		||||
 | 
			
		||||
- demos/texobj - runs, but crashes on exit if ESC is pressed. Exits cleanly
 | 
			
		||||
  if the Close box on the window frame is pressed with the mouse. Go figure.
 | 
			
		||||
 | 
			
		||||
- book/aaindex - doesn't run, can't get pixel format, because it wants an
 | 
			
		||||
  INDEX display maybe (but is okay on my Intel740 machine)?
 | 
			
		||||
 | 
			
		||||
- most of the book/* demos don't respond to ESC being pressed.
 | 
			
		||||
 | 
			
		||||
- 3dfx/demos/* - all demos run, however they all crash on exit. I've traced
 | 
			
		||||
  this so far as to determine the call it's happening with. The crash comes
 | 
			
		||||
  from within Glide during the processing of the grGlideShutdown() call, as
 | 
			
		||||
  in invalid memory reference exception. I'm wondering if this is because
 | 
			
		||||
  of some state or processing not being completed before the call. Dunno,
 | 
			
		||||
  but putting grSstIdle() in just before grGlideShutdown() does NOT fix the
 | 
			
		||||
  problem.
 | 
			
		||||
 | 
			
		||||
- 3dfx/demos/tunnel2 - does not run on my system even with SLI mode
 | 
			
		||||
  disabled. Hmmmm, maybe I need to disconnect my Voodoo2 cards?
 | 
			
		||||
 | 
			
		||||
*** Important Notes and Changing Default values
 | 
			
		||||
 | 
			
		||||
- The optimizer settings have been manually reworked in both command line
 | 
			
		||||
  and DevStudio IDE files to hopefully prevent possible irrational code on
 | 
			
		||||
  the part of the code generator.  Formerly, it was configured for "/Ox",
 | 
			
		||||
  now it is configured for safer handling at a slight potential performance
 | 
			
		||||
  cost. This may not be required for Visual Studio 6 but I can't test that
 | 
			
		||||
  (yet).
 | 
			
		||||
 | 
			
		||||
- These files build with the code targeted for Pentium processors and
 | 
			
		||||
  8-byte structure padding.
 | 
			
		||||
 | 
			
		||||
- The IDE-built programs seem to be "happier" in that the command line
 | 
			
		||||
  build of the 3Dfx demo "fire" will grenade on exit (?). Otherwise pretty
 | 
			
		||||
  much everything may be built with either interface.
 | 
			
		||||
 | 
			
		||||
- The currently configured Mesa version is 3.1, and MesaDemos version is
 | 
			
		||||
  the same. To change this permanently you will need to edit NMAKE.MAK and
 | 
			
		||||
  change the lines that look like this (they start o/a line 116):
 | 
			
		||||
 | 
			
		||||
    # Currently, Mesa is at rev 3.1 ...
 | 
			
		||||
    #
 | 
			
		||||
    !IF "$(MESAVER)" == ""
 | 
			
		||||
    MESAVER=3.1
 | 
			
		||||
    !ENDIF
 | 
			
		||||
 | 
			
		||||
    # used in building all of the resource files for the Mesa DLLs
 | 
			
		||||
    #
 | 
			
		||||
    !IF "$(MESAFILEVER)" == ""
 | 
			
		||||
    MESAFILEVER=3,1,0,0
 | 
			
		||||
    !ENDIF
 | 
			
		||||
 | 
			
		||||
- Currently the build files are configured to be used from a Win32
 | 
			
		||||
  directory that is included inside the main Mesa-3.1 heirarchy.
 | 
			
		||||
 | 
			
		||||
- The build files are smart enough to find the files for the core lib, glu,
 | 
			
		||||
  glut, and the various demo programs if they are unpacked in the current
 | 
			
		||||
  Mesa-3.1 heirarchy, like this:
 | 
			
		||||
 | 
			
		||||
    \Mesa-3.1
 | 
			
		||||
    \Mesa-3.1\src
 | 
			
		||||
    \Mesa-3.1\src-glu
 | 
			
		||||
    \Mesa-3.1\src-glut
 | 
			
		||||
    \Mesa-3.1\Win32
 | 
			
		||||
    \Mesa-3.1\samples
 | 
			
		||||
    \Mesa-3.1\demos
 | 
			
		||||
    \Mesa-3.1\book
 | 
			
		||||
    \Mesa-3.1\3Dfx\demos
 | 
			
		||||
 | 
			
		||||
    ... should work.  This arose because my initial build tests for the
 | 
			
		||||
    demo files were done before MesaDemos 2.6 had been released.
 | 
			
		||||
 | 
			
		||||
- With the exception of the static link libraries generated by this file
 | 
			
		||||
  set (mesagl.lib, mesaglu.lib, mesaglut.lib) all DLLs and executables are
 | 
			
		||||
  built against the "Multithreaded DLL" runtime - this means that they
 | 
			
		||||
  require MSVCRT.DLL or MSVCRTD.DLL in the path to execute.
 | 
			
		||||
 | 
			
		||||
  ** CHANGED 8/11/98 ***
 | 
			
		||||
 | 
			
		||||
  Note also that the demos are all built aginst the "OpenGL32, GLU32, and
 | 
			
		||||
  GLUT32" and as such they are fairly agnostic wrt: building against Mesa
 | 
			
		||||
  for CPU-rendering, Mesa-for-3Dfx, Mesa-for-S3, or System OpenGL.
 | 
			
		||||
 | 
			
		||||
  If you want to build them for use on your system and your display card
 | 
			
		||||
  provides full OpenGL acceleration (Permedia, Intel740, Intergraph,
 | 
			
		||||
  whatever) then you only need to build GLUT prior to building any of the
 | 
			
		||||
  demo programs. For convenience, the GLUT project is included in each of
 | 
			
		||||
  the demo projects Workspace files for the DevStudio IDE builds BUT it is
 | 
			
		||||
  not automatically built - you still need to build it first manually.
 | 
			
		||||
 | 
			
		||||
  Note that if you have GLUT already installed on your system (gl/glut.h in
 | 
			
		||||
  yoru INCLUDE path, glut32.lib/glut32d.lib in your LIB path, and the DLL
 | 
			
		||||
  in your PATH) then you do NOT need to build GLUT prior to the test
 | 
			
		||||
  programs.
 | 
			
		||||
 | 
			
		||||
- The 3Dfx build of Mesa has primarily been tested with Quake 2 and it runs
 | 
			
		||||
  (mostly) fine on my PC (take that for what you want it)...
 | 
			
		||||
 | 
			
		||||
  ** CHANGED  8/11/98 ***
 | 
			
		||||
 | 
			
		||||
  There is still something going on that causes Glide to crash on shutdown,
 | 
			
		||||
  when I run fxMesa under Windows NT, however it does not appear to occur
 | 
			
		||||
  under Windows 9x on either Voodoo1 or Voodoo2 cards. *sigh*
 | 
			
		||||
 | 
			
		||||
- I can not test the S3 build as I have no machines available with Virge
 | 
			
		||||
  based display cards.
 | 
			
		||||
 | 
			
		||||
- The multithreaded test code is *not* built as it requires pthreads and I
 | 
			
		||||
  have as of yet spent not time trying to get that running. The latest word
 | 
			
		||||
  that I saw WRT threading support on win32 was that they are intending to
 | 
			
		||||
  support it natively within Win32 - so I'm waiting it out until they get
 | 
			
		||||
  it done.
 | 
			
		||||
 | 
			
		||||
- Similarly, the 'xdemos' are not currently built because I haven't gotten
 | 
			
		||||
  around to building the client libs for native win32 and getting it all
 | 
			
		||||
  setup for use.
 | 
			
		||||
 | 
			
		||||
*** Output Files
 | 
			
		||||
 | 
			
		||||
All final output files (DLL/LIB) are placed in the Mesa-3.1/lib directory,
 | 
			
		||||
with the exception of the fxMesaGL32 build which is placed in
 | 
			
		||||
Mesa-3./lib/FX and the executable images which are placed in their source
 | 
			
		||||
directories.
 | 
			
		||||
 | 
			
		||||
To be able to execute the various test programs, you will need to copy the
 | 
			
		||||
requisite DLL files into the same directory as the EXE files. Note that
 | 
			
		||||
most of the 3Dfx/demos/* programs WILL run with the non-FX build of Mesa -
 | 
			
		||||
just very slowly. The two programs which are hard-linked with the FX build
 | 
			
		||||
and will not run without it are "glbpaltx" which uses "gl3DfxSetPaletteEXT"
 | 
			
		||||
directly instead of via the extensions mechanism and "tunnel2" which uses
 | 
			
		||||
"fxMesaSelectCurrentBoard" API for selecting between multiple 3Dfx cards
 | 
			
		||||
installed in one system. Likewise, "paltex" directly uses the
 | 
			
		||||
"glColorTableEXT" extension and thus may not run on anything except
 | 
			
		||||
Mesa. If these applications used the proper extension mechanism they could
 | 
			
		||||
then be used on more than "just" fxMesa to good effect (for example, the
 | 
			
		||||
rest of the "3Dfx/demos" run just peachy on the Intel740 card in my test
 | 
			
		||||
machine) under WinNT.
 | 
			
		||||
 | 
			
		||||
Because I'm anal about my computer and it's organization, and I like to
 | 
			
		||||
prevent collision between builds, each of the subprojects has their own
 | 
			
		||||
intermediate file directory inside .\win32\release (for example, when
 | 
			
		||||
building mesagl.lib all of it's intermediate files will be found in
 | 
			
		||||
.\win32\release\lib.mesagl).  This makes it very easy to cleanup as you
 | 
			
		||||
only need to remove .\win32\release.
 | 
			
		||||
 | 
			
		||||
*** Okay, Enough, how do I build with this stuff already Ted!
 | 
			
		||||
 | 
			
		||||
Okay, no major calamity here. The basic way to use the project file is to
 | 
			
		||||
call it via NMAKE from the command line. The format is:
 | 
			
		||||
 | 
			
		||||
    nmake[.exe] /f nmake.mak [options] [target]
 | 
			
		||||
 | 
			
		||||
The most likely [options] values you will use may be any combination of the
 | 
			
		||||
following:
 | 
			
		||||
 | 
			
		||||
    DEBUG=1 or DEBUG=0
 | 
			
		||||
    USE_CRTDLL=1 or USE_CRTDLL=0
 | 
			
		||||
 | 
			
		||||
    Note that all three of these options are OFF by default.
 | 
			
		||||
 | 
			
		||||
The [target] includes but is not limited to the following (for full details
 | 
			
		||||
please peruse the NMAKE.MAK and NMAKE.MIF files - but be warned that
 | 
			
		||||
NMAKE.MIF is rather large and sometimes hard to follow):
 | 
			
		||||
 | 
			
		||||
    --- convenience targets ---
 | 
			
		||||
 | 
			
		||||
    all                 - builds everything
 | 
			
		||||
    libfiles            - builds all linking library files
 | 
			
		||||
    progs               - builds all executable images
 | 
			
		||||
 | 
			
		||||
    --- library files, static and dynamic ---
 | 
			
		||||
 | 
			
		||||
    mesagl              - static lib build of Mesa core.
 | 
			
		||||
    mesaglu             - static lib build of MesaGLU core.
 | 
			
		||||
    mesaglut            - static lib build of Mesa GLUT core.
 | 
			
		||||
 | 
			
		||||
    mesagl32            - dynamic lib build of Mesa core.
 | 
			
		||||
 | 
			
		||||
    mesaglu32           - dynamic lib build of GLU core, generates
 | 
			
		||||
                          GLU32.DLL and/or GLU32d.DLL.
 | 
			
		||||
 | 
			
		||||
    mesaglut32          - dynamic lib build of GLUT core, generates
 | 
			
		||||
                          GLUT32.DLL and/or GLUT32d.dll.
 | 
			
		||||
 | 
			
		||||
    --- hardware accelerated mesa builds ---
 | 
			
		||||
 | 
			
		||||
    fxmesagl32          - builds Mesa for use on top of the 3Dfx
 | 
			
		||||
                          Glide runtime libs
 | 
			
		||||
 | 
			
		||||
    s3mesagl32          - builds mesa for use on top of the S3
 | 
			
		||||
                          'S3Tk' runtime libs.
 | 
			
		||||
 | 
			
		||||
    --- executable images ---
 | 
			
		||||
 | 
			
		||||
    progs.book          - builds all programs in \book directory
 | 
			
		||||
    progs.demos         - builds all programs in \demos directory
 | 
			
		||||
    progs.samples       - builds all programs in \samples directory
 | 
			
		||||
 | 
			
		||||
        These targets generate all of the programs in their respective
 | 
			
		||||
        directories and link the executables against OpenGL32.DLL,
 | 
			
		||||
        GLU32.DLL, and GLUT32.DLL (or their debug equivalents).
 | 
			
		||||
 | 
			
		||||
    progs.3dfx.demos    - builds all programs in \3dfx\demos directory
 | 
			
		||||
 | 
			
		||||
        This target generates the 3Dfx/Demo executables, linking them
 | 
			
		||||
        against GLUT32.DLL, GLU32.DLL, OPENGL32.DLL and are thus NOT
 | 
			
		||||
        hard-bound to using Mesa per-se as you can simply NOT build the
 | 
			
		||||
        Mesa core and GLU libraries.
 | 
			
		||||
 | 
			
		||||
   --- Microsoft/SGI OpenGL-based GLUT and Demo program builds ----
 | 
			
		||||
 | 
			
		||||
   *** IMPORTANT SAFETY TIP: If you're going to build these variants of
 | 
			
		||||
       GLUT then DO NOT build any other target libraries in this package
 | 
			
		||||
       first, OR from the command line run the "nmake /f nmake.mak clean"
 | 
			
		||||
       command first!  This is because generation of the GLUT for SGI
 | 
			
		||||
       OpenGL target libraries conflicts in naming with the static build
 | 
			
		||||
       libraries of Mesa and it's supporting GLUT build.
 | 
			
		||||
 | 
			
		||||
   Currently, you may build GLUT as either GLUT32.DLL or GLUT.DLL for
 | 
			
		||||
   use running against either Microsoft or SGI OpenGL for Window,
 | 
			
		||||
   respectively.  This allows for the general use of GLUT 3.7 on Windows
 | 
			
		||||
   systems with fully compliant OpenGL.
 | 
			
		||||
 | 
			
		||||
   You can build the GLUT DLL files either with the command line by
 | 
			
		||||
   issuing either of these commands:
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak glut.sysgl
 | 
			
		||||
 | 
			
		||||
        <or>
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak glut.sgigl
 | 
			
		||||
 | 
			
		||||
   OR by using the DevStudio MesaLib Worksapce build the GLUT_SGIGL or
 | 
			
		||||
   GLUT_SYSGL projects within the DevStudio IDE.
 | 
			
		||||
 | 
			
		||||
   Unfortunately, the only way to build the test programs against this
 | 
			
		||||
   build of GLUT is via the command line, and I will NOT be making
 | 
			
		||||
   duplicate demo program projects for the IDE as it's just not worth it,
 | 
			
		||||
   sorry.
 | 
			
		||||
 | 
			
		||||
   To build the test programs against either MS or SGI OpenGL, you do so
 | 
			
		||||
   via either of these two commands:
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak progs.sysgl
 | 
			
		||||
 | 
			
		||||
        <or>
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak progs.sgigl
 | 
			
		||||
 | 
			
		||||
   To use the GLUT-for-system-OpenGL in your own programs, you need to do
 | 
			
		||||
   three things by way of preparation, after building GLUT of course:
 | 
			
		||||
 | 
			
		||||
         1. Copy include\gl\glut.h to somewhere in your %INCLUDE% path, one
 | 
			
		||||
            likely candidate location would be in your
 | 
			
		||||
            "DevStudio\VC\INCLUDE\GL" directory.
 | 
			
		||||
 | 
			
		||||
         2. Copy the linking libraries to somewhere in your %LIB% path, one
 | 
			
		||||
            likely candidate location would be in your "DevStudio\VC\LIB"
 | 
			
		||||
            directory. The linking libraries you need to copy are as
 | 
			
		||||
            follows:
 | 
			
		||||
 | 
			
		||||
                .\Release\GLUT32.LIB
 | 
			
		||||
                .\Release\GLUT.LIB
 | 
			
		||||
                .\Debug\GLUT32.LIB
 | 
			
		||||
                .\Debug\GLUT.LIB
 | 
			
		||||
 | 
			
		||||
        3. Copy the runtime libraries to somewhere in your %PATH%, one
 | 
			
		||||
           likely candidate location would be in WINDOWS\SYSTEM. the files
 | 
			
		||||
           that you should copy are as follows:
 | 
			
		||||
 | 
			
		||||
                .\Release\GLUT32.DLL
 | 
			
		||||
                .\Release\GLUT32.PDB
 | 
			
		||||
                .\Release\GLUT.DLL
 | 
			
		||||
                .\Release\GLUT.PDB
 | 
			
		||||
                .\Debug\GLUT32d.DLL
 | 
			
		||||
                .\Debug\GLUT32d.PDB
 | 
			
		||||
                .\Debug\GLUTd.DLL
 | 
			
		||||
                .\Debug\GLUTd.PDB
 | 
			
		||||
 | 
			
		||||
Some examples are in order ...
 | 
			
		||||
 | 
			
		||||
    ... build all dynamic-link libs using MSVCRT.DLL for C runtime:
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak USE_CRTDLL=1 alldynamic
 | 
			
		||||
 | 
			
		||||
    ... To build all library variants and all test and demonstration
 | 
			
		||||
        programs with the default settings you do this:
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak all
 | 
			
		||||
 | 
			
		||||
    ... to build all static link libs and nothing else you do this:
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak allstatic
 | 
			
		||||
 | 
			
		||||
    ... to build all non-accelerated dynamic link libs you do this:
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak alldynamic
 | 
			
		||||
 | 
			
		||||
    ... to build all 3Dfx targeted dynamic link libs you do this:
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak allaccel
 | 
			
		||||
 | 
			
		||||
    ... to build all S3 Virge targetd dynamic link libs you do this:
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak alls3
 | 
			
		||||
 | 
			
		||||
    ... to build all libraries, static and dynamic, in all versions
 | 
			
		||||
        you do this:
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak libfiles
 | 
			
		||||
 | 
			
		||||
    ... to subsequently build all demo and test programs you do this:
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak progs
 | 
			
		||||
 | 
			
		||||
    ... to cleanup all intermediate files you do this:
 | 
			
		||||
 | 
			
		||||
        nmake /f clean
 | 
			
		||||
 | 
			
		||||
You get the picture. (I hope) ;^)  You may also specify specify
 | 
			
		||||
single targets in a convenient fashion. The rule is simple, any of the
 | 
			
		||||
above named lib files, static or dynamic, may be built by providing it's
 | 
			
		||||
name on the command line as the target. Examples:
 | 
			
		||||
 | 
			
		||||
    ... to build only Mesa as OpenGL32.DLL ...
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak opengl32
 | 
			
		||||
 | 
			
		||||
    ... to build only Mesa on top of the 3Dfx Glide API ...
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak fxMesaGL32
 | 
			
		||||
              <or>
 | 
			
		||||
        nmake /f nmake.mak fxMesaGL
 | 
			
		||||
 | 
			
		||||
    ... to build only Mesa on top of the S3 Toolkit ...
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak s3MesaGL32
 | 
			
		||||
              <or>
 | 
			
		||||
        nmake /f nmake.mak s3mesaGL
 | 
			
		||||
 | 
			
		||||
*** Revision history for ./win32 project files
 | 
			
		||||
 | 
			
		||||
1/18/98 - initial cut submitted and included with core mesa
 | 
			
		||||
2/5/98  - fixed internal dependency within nmake.mif upon there being
 | 
			
		||||
          a $(DEVDIR) variable to make some temporary batch files
 | 
			
		||||
          dependant upon (thanks to Keven T. McDonnell for finding
 | 
			
		||||
          that there was this particular bug). I also updated the
 | 
			
		||||
          build files for 2.6beta6.
 | 
			
		||||
2/8/98  - added DevStudio workspace and project files for all lib
 | 
			
		||||
          files and some test programs. Updated readme.win32.
 | 
			
		||||
6/25/98 - initial revision for Mesa 3.0, does not include IDE files,
 | 
			
		||||
          not everything is running. *sigh*
 | 
			
		||||
7/20/98 - Mesa 3.0beta6 rev of all build files, all libs built and
 | 
			
		||||
          minimally tested, all demo programs built and minimally
 | 
			
		||||
          tested to within limits of my PC. ;^) Eveything looks
 | 
			
		||||
          MUCH better now ...
 | 
			
		||||
7/30/98 - Minor updates/edits based upon feedback from
 | 
			
		||||
          Eero Pajarre <epajarre@koti.tpo.fi>. These updates include a fix
 | 
			
		||||
          to the Mesa-on-3Dfx build such that Quake-II now runs almost
 | 
			
		||||
          properly on my system. It runs, just *very* slowly and with *no*
 | 
			
		||||
          textures. Hmmm. Doesn't make any difference whether Quake is set
 | 
			
		||||
          to use 8-bit textures or not.
 | 
			
		||||
8/13/98 - Lots of build cleanups, minor bug fixes in fxwgl.c, and
 | 
			
		||||
          compatability fix in fxapi.c for in-window rendering using 3Dfx
 | 
			
		||||
          hardware.
 | 
			
		||||
8/26/98 - Final revisions for Mesa 3 release checked
 | 
			
		||||
9/22/98 - Fixed static builds for all but fxMesaGL32 and s3MesaGL32 targets
 | 
			
		||||
9/29/98 - Reorganized FAQ information and added Added faq entry about Glide
 | 
			
		||||
          bug under NT (crash on exit) and a workaround.
 | 
			
		||||
11/21/98 - Updated files for Mesa 3.1 beta 1
 | 
			
		||||
           Updated fxMesa window-hack code
 | 
			
		||||
           Updated fxMesa resolution support to handle 1600x1200 & 1280x1024
 | 
			
		||||
7/9/99  - Rev'd for Mesa 3.1 beta 2
 | 
			
		||||
File: docs/README.WIN32
 | 
			
		||||
 | 
			
		||||
Last updated: Aug 15, 2002 - Karl Schultz - kschultz@users.sourceforge.net
 | 
			
		||||
 | 
			
		||||
Quick Start
 | 
			
		||||
 | 
			
		||||
If you have Microsoft Visual C++ 6.0 installed, simply go to the top directory
 | 
			
		||||
of the Mesa distribution and type 'nmake -f Makefile.win NODEBUG=1' for
 | 
			
		||||
an optimized build.  Note that you may have to run ...VC98/BIN/VCVARS32.BAT
 | 
			
		||||
to set up the appropriate compiler environment variables.
 | 
			
		||||
 | 
			
		||||
Details and Notes
 | 
			
		||||
 | 
			
		||||
- Building Mesa as noted above should visit and build the following:
 | 
			
		||||
  src        MesaGL.dll, MesaGL.lib, osmesa.dll, osmesa.lib
 | 
			
		||||
  si-glu     MesaGLU.dll, MesaGLU.lib
 | 
			
		||||
  src-glut   glut32.dll, glut32.lib
 | 
			
		||||
  demos      a handful of demo executables.
 | 
			
		||||
 | 
			
		||||
- After building, you can copy the above DLL files to a place in your PATH
 | 
			
		||||
  such as $SystemRoot/SYSTEM32.  If you don't like putting things in a
 | 
			
		||||
  system directory, place them in the same directory as the executable(s).
 | 
			
		||||
  For example, you can copy the DLL files to the demos directory if you
 | 
			
		||||
  just want to run the demos. The build process places the DLL and LIB files
 | 
			
		||||
  in the ./lib directory.  The makefile creates this directory if it does 
 | 
			
		||||
  not already exist.
 | 
			
		||||
 | 
			
		||||
- The make targets 'clean' and 'clobber' will remove objects and libraries.
 | 
			
		||||
  But the files in ./lib are never cleaned.
 | 
			
		||||
 | 
			
		||||
- The make target 'install' will take its best shot at copying DLL files,
 | 
			
		||||
  LIB files, and headers to the right places.  I strongly suggest that
 | 
			
		||||
  you examine the makefiles to make sure that 'install' doesn't do anything
 | 
			
		||||
  that you can't live with.
 | 
			
		||||
 | 
			
		||||
- The makefiles are designed to work with Microsoft's NMAKE, and do,
 | 
			
		||||
  unfortunately, have some Microsoft-specific things in them.  If you
 | 
			
		||||
  would like to use gcc or some other build tools like the Cygnus tools,
 | 
			
		||||
  then you will have to hack the makefiles to make them work with your
 | 
			
		||||
  tools.  I'm sorry about this; I wasn't motivated to make this any
 | 
			
		||||
  different, but if you end up modifying the makefiles for your tools,
 | 
			
		||||
  you can send me the changes and I can apply the changes to the 
 | 
			
		||||
  source tree.
 | 
			
		||||
 | 
			
		||||
- There are no Microsoft Visual Studio project files.  However, these
 | 
			
		||||
  should be very easy to create.  One can use the compiler and linker
 | 
			
		||||
  options found in the makefiles to make quick progress in creating
 | 
			
		||||
  projects.
 | 
			
		||||
 | 
			
		||||
- The DLL files are built so that the external entry points use the
 | 
			
		||||
  stdcall calling convention.
 | 
			
		||||
 | 
			
		||||
- Static LIB files are not built.  The LIB files that are built with
 | 
			
		||||
  the current makefiles are the linker import files associated with
 | 
			
		||||
  the DLL files.  If static LIB's are desired, it should not be too
 | 
			
		||||
  difficult to modify the makefiles to generate them.
 | 
			
		||||
 | 
			
		||||
- The si-glu sources are used to build the GLU libs.  This was done
 | 
			
		||||
  mainly to get the better tessellator code.
 | 
			
		||||
 | 
			
		||||
- The osmesa driver builds and should work on Windows as well as
 | 
			
		||||
  any other platform.
 | 
			
		||||
 | 
			
		||||
- The Windows driver (in src/Windows) builds and runs at least at
 | 
			
		||||
  a minimal level.  I modified this driver to work with the new
 | 
			
		||||
  Mesa 4.0 code and driver architecture, but I did not do a great
 | 
			
		||||
  deal of optimization and testing.  There are many opportunities
 | 
			
		||||
  for optimization, many of which can be done by coding more specific
 | 
			
		||||
  paths for the rasterizers.  See src/osmesa/osmesa.c for some good
 | 
			
		||||
  examples.
 | 
			
		||||
 | 
			
		||||
- There is DirectDraw support in the Windows driver, updated by
 | 
			
		||||
  Daniel Slater.  You'll need to uncomment the #define DDRAW line
 | 
			
		||||
  in src/Windows/wmesadef.h and add ddraw.lib to the list of libraries
 | 
			
		||||
  in src/Makefile.win.  On some systems, you will acheive significantly
 | 
			
		||||
  higher framerates with DirectDraw.
 | 
			
		||||
 | 
			
		||||
- Some of the more specialized code like FX drivers, stereo, and
 | 
			
		||||
  parallel support isn't compiled or tested.  I left much of this
 | 
			
		||||
  code alone, but it may need some work to get it 'turned on' again.
 | 
			
		||||
 | 
			
		||||
- No assembly code is compiled or assembled.  Again, this may need
 | 
			
		||||
  some work to turn it back on or use it again.
 | 
			
		||||
 | 
			
		||||
If you have a Windows-related build problem or question, it is
 | 
			
		||||
probably better to direct it to me (kschultz@users.sourceforge.net),
 | 
			
		||||
rather than directly to the other Mesa developers.  I will help you
 | 
			
		||||
as much as I can.  I also monitor the Mesa mailing lists and will
 | 
			
		||||
answer questions in this area there as well.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Karl Schultz
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										146
									
								
								docs/README.WINDML
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										146
									
								
								docs/README.WINDML
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,146 @@
 | 
			
		||||
 | 
			
		||||
                        WindML Driver for Mesa 4.0
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Requirements
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
Tornado 2 + WindML, Cumulative Patchs are recommended. 
 | 
			
		||||
  
 | 
			
		||||
I suppose you have a valid WindML installation. Double buffer hardware
 | 
			
		||||
gives better performance than double buffer software so if you can
 | 
			
		||||
compile your WindML driver with this option, just do it. I/O
 | 
			
		||||
redirection is adviced in target server.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Tested on
 | 
			
		||||
---------
 | 
			
		||||
 | 
			
		||||
During the development, my main target was a CoolMonster:
 | 
			
		||||
- Video card: CT69000
 | 
			
		||||
- CPU: PENTIUM 266MHz
 | 
			
		||||
 | 
			
		||||
and my host a Windows NT + Tornado 2.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Installation
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
1. Mesa sources must be in root directory (C:\)
 | 
			
		||||
 | 
			
		||||
2. Add the following line to your torVars.bat:
 | 
			
		||||
set MESA_BASE=C:\Mesa
 | 
			
		||||
 | 
			
		||||
OR copy the new torVars.bat in your bin path:
 | 
			
		||||
c:/Mesa/src/ugl/tornado/torVars.sample -> 
 | 
			
		||||
/mnt/nt/Tornado/host/x86-win32/bin/torVars (for example)
 | 
			
		||||
 | 
			
		||||
3. In a command prompt:
 | 
			
		||||
$ torVars
 | 
			
		||||
$ cd c:\Mesa
 | 
			
		||||
$ make -f Makefile.ugl CPU=PENTIUM
 | 
			
		||||
 | 
			
		||||
Take a long while...
 | 
			
		||||
 | 
			
		||||
5. Include all the files from ugldemos folder to build some downloadable
 | 
			
		||||
   application modules
 | 
			
		||||
 | 
			
		||||
4. Download UGL/Mesa object files on target
 | 
			
		||||
 | 
			
		||||
For example via the WindShell:
 | 
			
		||||
ld < c:\Tornado\target\lib\objMesaGL.o
 | 
			
		||||
ld < c:\Tornado\target\lib\objMesaUGL.o
 | 
			
		||||
ld < c:\Tornado\target\lib\objMesaGLU.o
 | 
			
		||||
ld < c:\Tornado\target\lib\objGLUTshapes.o
 | 
			
		||||
ld < c:\Tornado\target\lib\objMesaOS.o
 | 
			
		||||
 | 
			
		||||
You can put the previous lines in a file and use:
 | 
			
		||||
< filename
 | 
			
		||||
 | 
			
		||||
6. Download the application modules.
 | 
			
		||||
 | 
			
		||||
7. In WindShell, run:
 | 
			
		||||
-> uglalldemos
 | 
			
		||||
 | 
			
		||||
During the show some messages will appear, it provides some useful
 | 
			
		||||
information on key management.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Coding
 | 
			
		||||
------
 | 
			
		||||
 | 
			
		||||
Sample Usage:
 | 
			
		||||
 | 
			
		||||
In addition to the usual ugl calls to initialize UGL, (may be find an
 | 
			
		||||
input driver), you must do the following to use the UGL/Mesa interface:
 | 
			
		||||
 | 
			
		||||
1. Call uglMesaCreateContext() to create a UGL/Mesa rendering context,
 | 
			
		||||
   given the display format.
 | 
			
		||||
 | 
			
		||||
2. Call uglMesaMakeCurrent() to bind the UGL/Mesa buffers to an
 | 
			
		||||
   UGL/Mesa Context and to make the context the current one.
 | 
			
		||||
 | 
			
		||||
3. Make gl* calls to render your graphics.
 | 
			
		||||
 | 
			
		||||
4. Use uglMesaSwapBuffers() when double buffering to swap front/back buffers.
 | 
			
		||||
 | 
			
		||||
5. Before the UGL is destroyed, call MesaDestroyContext().
 | 
			
		||||
 | 
			
		||||
6. Before exiting, call if required uglEventQDestroy and then
 | 
			
		||||
   uglDeinitialize();
 | 
			
		||||
 | 
			
		||||
Limitations
 | 
			
		||||
-----------
 | 
			
		||||
 | 
			
		||||
I found the following limitations in my driver :
 | 
			
		||||
 - Color Indexed management is only in 8 bits
 | 
			
		||||
 - It's possible to mix UGL/OpenGL application with a software
 | 
			
		||||
   double buffer
 | 
			
		||||
 | 
			
		||||
Modifications
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
New files in Mesa:
 | 
			
		||||
- Makefile.ugl
 | 
			
		||||
- rules.windmlmesa
 | 
			
		||||
- docs/README.UGL
 | 
			
		||||
- include/GL/uglmesa.h
 | 
			
		||||
- si-glu/Makefile.ugl
 | 
			
		||||
- src/Makefile.ugl
 | 
			
		||||
- src/ugl/torGLUTShapesInit.c
 | 
			
		||||
- src/ugl/torMesaUGLInit.c
 | 
			
		||||
- src/ugl/ugl_api.c
 | 
			
		||||
- src/ugl/ugl_dd.c
 | 
			
		||||
- src/ugl/ugl_glutshapes.c
 | 
			
		||||
- src/ugl/ugl_line.c
 | 
			
		||||
- src/ugl/ugl_span.c
 | 
			
		||||
- src/ugl/ugl_tri.c
 | 
			
		||||
- src/ugl/uglmesaP.h
 | 
			
		||||
- ugldemos/*
 | 
			
		||||
 | 
			
		||||
Modified files in Tornado 2.0:
 | 
			
		||||
- c:\Tornado\host\x86-win32\bin\torVars.bat
 | 
			
		||||
rem Command line build environments
 | 
			
		||||
set WIND_HOST_TYPE=x86-win32
 | 
			
		||||
set WIND_BASE=C:\Tornado
 | 
			
		||||
set MESA_BASE=C:\Mesa
 | 
			
		||||
set PATH=%WIND_BASE%\host\%WIND_HOST_TYPE%\bin;%PATH%
 | 
			
		||||
- c:\Tornado\target\config\comps\VxWorks\01uglmesa.cdf
 | 
			
		||||
- c:\Tornado\target\h\GL\*
 | 
			
		||||
 | 
			
		||||
Todo
 | 
			
		||||
----
 | 
			
		||||
- GCC 2.96, ASM compilation
 | 
			
		||||
 | 
			
		||||
Thanks to:
 | 
			
		||||
----------
 | 
			
		||||
 | 
			
		||||
Precision Insight team for their great job around Mesa, XFree, and DRI.
 | 
			
		||||
Wind River Systems to take me as an intern.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Stephane Raimbault
 | 
			
		||||
<stephane.raimbault@windriver.com>
 | 
			
		||||
<stephane.raimbault@deesse.univ-lemans.fr>
 | 
			
		||||
 | 
			
		||||
July 24, 2001
 | 
			
		||||
@@ -1,33 +1,54 @@
 | 
			
		||||
 | 
			
		||||
                         Mesa 3.0 Unix/X11 Information
 | 
			
		||||
                      Mesa 4.0.4 Unix/X11 Information
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Installation
 | 
			
		||||
============
 | 
			
		||||
 | 
			
		||||
To compile the library, first type 'make' alone to see the list of system
 | 
			
		||||
configurations currently supported.  If you see your configuration on the
 | 
			
		||||
list, type 'make <config>'.  Most popular Unix/X workstations are currently
 | 
			
		||||
supported.
 | 
			
		||||
There are two ways to compile Mesa on Unix/X11 systems:
 | 
			
		||||
 | 
			
		||||
1. The old way:
 | 
			
		||||
    First type 'make' alone to see the list of system
 | 
			
		||||
    configurations currently supported.  If you see your configuration on the
 | 
			
		||||
    list, type 'make <config>'.  Most popular Unix/X workstations are currently
 | 
			
		||||
    supported.
 | 
			
		||||
 | 
			
		||||
    If your system configuration is not listed by 'make', you'll have to modify
 | 
			
		||||
    the top-level Makefile and Make-config files.  There are instructions in
 | 
			
		||||
    each file.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
2. The new way:
 | 
			
		||||
    Type './configure' and then 'make'.  This uses GNU autoconfig.
 | 
			
		||||
    See docs/INSTALL for more details.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
The top-level makefile will execute the makefiles in a number of sub-
 | 
			
		||||
directories.  When finished, the Mesa libraries will be in the Mesa-2.6/lib/
 | 
			
		||||
directories.  When finished, the Mesa libraries will be in the Mesa-4.0.4/lib/
 | 
			
		||||
directory.  A few GLUT demos in the demos/ directory should be ready to run.
 | 
			
		||||
 | 
			
		||||
If you also downloaded and unpacked the demos there should be executables
 | 
			
		||||
in the "xdemos/", "samples/", and "book/" directories for you to try out.
 | 
			
		||||
If you only want to compile the contents of one subdirectory you can 'cd'
 | 
			
		||||
to that directory and type 'make <config>' there.
 | 
			
		||||
 | 
			
		||||
If your system configuration is not listed by 'make', you'll have to modify
 | 
			
		||||
the top-level Makefile and Make-config files.  There are instructions in
 | 
			
		||||
each file.
 | 
			
		||||
 | 
			
		||||
If you have compilation problems you should try to fix them and return the
 | 
			
		||||
patches to the author.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Notes on assembly language optimizations:
 | 
			
		||||
 | 
			
		||||
   When using the old-style Makefiles, you can specify a configuration
 | 
			
		||||
   that uses X86 assembly language optimizations (linux-3dnow for example).
 | 
			
		||||
 | 
			
		||||
   The detection of MMX, 3DNow!, PIII/SSE, etc capability is done at
 | 
			
		||||
   runtime.  That means you can compile Mesa for 3DNow! optimizations
 | 
			
		||||
   even if you don't have an AMD CPU.
 | 
			
		||||
 | 
			
		||||
   However, your Linux binutils and assembler must understand the
 | 
			
		||||
   special instructions in order to compile them.  If you have
 | 
			
		||||
   compilation problems, try upgrading your binutils.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Header and library files:
 | 
			
		||||
   After you've compiled Mesa and tried the demos I recommend the following
 | 
			
		||||
   procedure for "installing" Mesa.
 | 
			
		||||
@@ -120,7 +141,7 @@ Xt/Motif Widgets:
 | 
			
		||||
 | 
			
		||||
Togl:
 | 
			
		||||
   Togl is an OpenGL/Mesa widget for Tcl/Tk.
 | 
			
		||||
   See http://www.ssec.wisc.edu/~brianp/Togl.html for more information.
 | 
			
		||||
   See http://togl.sourceforge.net for more information.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -239,6 +260,7 @@ Extensions:
 | 
			
		||||
   The following OpenGL GLX extensions are currently implemented:
 | 
			
		||||
 | 
			
		||||
      GLX_EXT_visual_info - GLX visual and transparent pixel extension
 | 
			
		||||
      GLX_EXT_visual_rating - GLX visual caveats
 | 
			
		||||
 | 
			
		||||
   For detailed information about the extensions see www.opengl.org
 | 
			
		||||
 | 
			
		||||
@@ -301,4 +323,4 @@ Summary of X-related environment variables:
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: README.X11,v 3.3 1999/09/15 16:39:01 brianp Exp $
 | 
			
		||||
$Id: README.X11,v 3.8.2.4 2002/09/03 17:50:21 brianp Exp $
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										146
									
								
								docs/RELNOTES-3.1
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										146
									
								
								docs/RELNOTES-3.1
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,146 @@
 | 
			
		||||
 | 
			
		||||
                         Mesa 3.1 release notes
 | 
			
		||||
 | 
			
		||||
                             PLEASE READ!!!!
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
New copyright
 | 
			
		||||
-------------
 | 
			
		||||
 | 
			
		||||
Mesa 3.1 will be distributed under an XFree86-style copyright instead
 | 
			
		||||
of the GNU LGPL.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
New directories
 | 
			
		||||
---------------
 | 
			
		||||
 | 
			
		||||
All documentation files are now in the docs/ directory.
 | 
			
		||||
All shell scripts are now in the bin/ directory.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
New library names
 | 
			
		||||
-----------------
 | 
			
		||||
 | 
			
		||||
Formerly, the main Mesa library was named libMesaGL.so (or libMesaGL.a)
 | 
			
		||||
and the GLU library was named libMesaGLU.so (or libMesaGLU.a).
 | 
			
		||||
 | 
			
		||||
Now, the main library is named libGL.so (or libGL.a) and the GLU library
 | 
			
		||||
is named libGLU.so (or libGLU.a).
 | 
			
		||||
 | 
			
		||||
The change allows Mesa to be more easily substituted for OpenGL.
 | 
			
		||||
Specifically, the linker/loader on some Unix-like systems won't
 | 
			
		||||
allow libMesaGL.so to be used instead of libGL.so if the application
 | 
			
		||||
was linked with the former.
 | 
			
		||||
 | 
			
		||||
Warning: if you have another OpenGL implementation installed on your
 | 
			
		||||
system (i.e. you have another OpenGL libGL.so) you'll have to be
 | 
			
		||||
carefull about which library (OpenGL or Mesa) you link against.  Be
 | 
			
		||||
aware of -L linker flags and the value of the LD_LIBRARY_PATH environment
 | 
			
		||||
variable.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
New library versioning
 | 
			
		||||
----------------------
 | 
			
		||||
 | 
			
		||||
Previously, the Mesa GL library was named libMesaGL.so.3.0
 | 
			
		||||
To better support Linux/OpenGL standards, the Mesa GL library is now
 | 
			
		||||
named libGL.so.1.2.030100  This indicates version 1.2 of the OpenGL spec
 | 
			
		||||
and Mesa implementation 3.1.0
 | 
			
		||||
 | 
			
		||||
In the long term this will allow better interoperability with other
 | 
			
		||||
OpenGL implementations, especially on Linux.  In the short term,
 | 
			
		||||
OpenGL apps may have to be relinked to use the new library naming.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
New makefiles
 | 
			
		||||
-------------
 | 
			
		||||
 | 
			
		||||
The old Makefiles found in the various directories have been renamed
 | 
			
		||||
to Makefile.X11 in order to prevent filename collisions with autoconfig-
 | 
			
		||||
generated Makefiles.
 | 
			
		||||
 | 
			
		||||
The top-level Makefile simply includes Makefile.X11
 | 
			
		||||
If your top-level Makefile get's overwritten/destroyed you can restore
 | 
			
		||||
it by copying Makefile.X11 to Makefile
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
New extensions
 | 
			
		||||
--------------
 | 
			
		||||
 | 
			
		||||
GL_EXT_stencil_wrap
 | 
			
		||||
	Implements two new stencil operations: GL_INCR_WRAP_EXT and
 | 
			
		||||
	GL_DECR_WRAP_EXT which allow stencil increment and decrement
 | 
			
		||||
	without clamping.
 | 
			
		||||
 | 
			
		||||
GL_INGR_blend_func_separate
 | 
			
		||||
	Allows specification of blend factors for RGB and Alpha independently.
 | 
			
		||||
	(INGR = Intergraph)
 | 
			
		||||
 | 
			
		||||
GL_ARB_multitexture
 | 
			
		||||
	Multiple simultaneous textures.  (ARB = Architecture Review Board)
 | 
			
		||||
 | 
			
		||||
GL_NV_texgen_reflection
 | 
			
		||||
	nVidia texgen extension for better reflection mapping.
 | 
			
		||||
 | 
			
		||||
GL_PGI_misc_hints
 | 
			
		||||
	Assorted transformation hints.
 | 
			
		||||
 | 
			
		||||
GL_EXT_compiled_vertex_array
 | 
			
		||||
	Compiled vertex arrays.
 | 
			
		||||
 | 
			
		||||
GL_EXT_clip_volume_hint
 | 
			
		||||
	Allows one to disable clip volume (frustum) testing.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Extensions removed
 | 
			
		||||
------------------
 | 
			
		||||
 | 
			
		||||
GL_EXT_multitexture - obsolete in favor of GL_ARB_multitexture
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Config file
 | 
			
		||||
-----------
 | 
			
		||||
 | 
			
		||||
By default, /etc/mesa.conf will be read when Mesa starts.  This
 | 
			
		||||
file controls default hints, enable/disable of extensions, and
 | 
			
		||||
more.  See the CONFIG file for documentation.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Optimizations
 | 
			
		||||
-------------
 | 
			
		||||
 | 
			
		||||
Keith Whitwell has contributed significant optimizations to Mesa's
 | 
			
		||||
vertex transformation code.  Basically, the whole transformation
 | 
			
		||||
stage of Mesa has been rewritten.
 | 
			
		||||
 | 
			
		||||
It's impossible to give a speedup factor.  You'll just have to
 | 
			
		||||
try your app and see how it performs.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Device Driver changes
 | 
			
		||||
---------------------
 | 
			
		||||
 | 
			
		||||
A bunch of new device driver functions have been added.  See src/dd.h
 | 
			
		||||
Keith Harrison contributed many of them.  I've been planning on adding
 | 
			
		||||
a bunch of functions like these to make writing hardware drivers easier.
 | 
			
		||||
More such function will probably be added in the near future.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Miscellaneous
 | 
			
		||||
-------------
 | 
			
		||||
 | 
			
		||||
util/glstate.c has some handy functions for debugging.  Basically, it
 | 
			
		||||
offers a simple function for printing GL state variables.  It's not
 | 
			
		||||
finished yet.  There's a LOT more GLenum records to be added (see the
 | 
			
		||||
code).  Anyone want to help?
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: RELNOTES-3.1,v 1.2 2000/04/07 17:08:06 brianp Exp $
 | 
			
		||||
							
								
								
									
										12
									
								
								docs/RELNOTES-3.2
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								docs/RELNOTES-3.2
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
 | 
			
		||||
                         Mesa 3.2 release notes
 | 
			
		||||
 | 
			
		||||
                             PLEASE READ!!!!
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Mesa 3.2 is a stabilization of the Mesa 3.1 release.  No new features
 | 
			
		||||
have been added.  For a list of bug fixes please read the VERSIONS file.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: RELNOTES-3.2,v 1.2 2000/04/07 17:08:06 brianp Exp $
 | 
			
		||||
							
								
								
									
										32
									
								
								docs/RELNOTES-3.2.1
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								docs/RELNOTES-3.2.1
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,32 @@
 | 
			
		||||
 | 
			
		||||
                         Mesa 3.2.1 release notes
 | 
			
		||||
 | 
			
		||||
                             PLEASE READ!!!!
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
The Mesa 3.2.1 release mainly just fixes bugs since the 3.2 release.
 | 
			
		||||
See the VERSIONS file for the exact list.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
GLU Polygon Tessellator
 | 
			
		||||
-----------------------
 | 
			
		||||
 | 
			
		||||
The GLU tessellator has been reverted back to the version included
 | 
			
		||||
with Mesa 3.0 since it's more stable.  The Mesa 3.1/3.2 tessellator
 | 
			
		||||
implemented the GLU 1.3 specification but suffered from a number of
 | 
			
		||||
bugs.
 | 
			
		||||
 | 
			
		||||
Mesa implements GLU 1.1.
 | 
			
		||||
 | 
			
		||||
Ideally, people should use the GLU 1.3 library included in SGI's
 | 
			
		||||
OpenGL Sample Implementation (SI) available from 
 | 
			
		||||
http://oss.sgi.com/projects/ogl-sample/
 | 
			
		||||
People are working to make easy-to-install Linux RPMs of the
 | 
			
		||||
GLU library.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: RELNOTES-3.2.1,v 1.2 2000/07/21 16:32:33 brianp Exp $
 | 
			
		||||
							
								
								
									
										271
									
								
								docs/RELNOTES-3.3
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										271
									
								
								docs/RELNOTES-3.3
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,271 @@
 | 
			
		||||
 | 
			
		||||
                         Mesa 3.3 release notes
 | 
			
		||||
 | 
			
		||||
                             July 21, 2000
 | 
			
		||||
 | 
			
		||||
                             PLEASE READ!!!!
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Introduction
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
Mesa uses an even/odd version number scheme like the Linux kernel.
 | 
			
		||||
Odd numbered versions (such as 3.3) designate new developmental releases.
 | 
			
		||||
Even numbered versions (such as 3.2.1) designate stable releases.
 | 
			
		||||
 | 
			
		||||
Mesa 3.3 has a undergone many internal changes since version 3.2
 | 
			
		||||
and features a lot of new extensions.  3.3 is expected to be pretty
 | 
			
		||||
stable, but perhaps not as stable as 3.2 which has been used by
 | 
			
		||||
thousands of users over the past months.
 | 
			
		||||
 | 
			
		||||
Everyone is encouraged to try Mesa 3.3.  Bugs should be reported to
 | 
			
		||||
the Mesa bug database on www.sourceforge.net.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Header file / GLenum changes
 | 
			
		||||
----------------------------
 | 
			
		||||
 | 
			
		||||
The gl.h and glu.h headers now use #defines to define all GL_* tokens
 | 
			
		||||
instead of C-language enums.  This change improves Mesa/OpenGL
 | 
			
		||||
interoperability.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
New API dispatch code
 | 
			
		||||
---------------------
 | 
			
		||||
 | 
			
		||||
The core Mesa gl* functions are now implemented with a new dispatch
 | 
			
		||||
(jump table) which will allow simultaneous direct/indirect rendering.
 | 
			
		||||
 | 
			
		||||
The code is found in the glapi*.[ch] files.
 | 
			
		||||
 | 
			
		||||
Of interest:  the actual "glFooBar" functions are generated with
 | 
			
		||||
templatized code defined in glapitemp.h and included by glapi.c
 | 
			
		||||
The glapitemp.h template should be reusable for all sorts of OpenGL
 | 
			
		||||
projects.
 | 
			
		||||
 | 
			
		||||
The new dispatch code has also optimized with x86 assembly code.
 | 
			
		||||
This optimization eliminates copying the function arguments during
 | 
			
		||||
dispatch.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
New thread support
 | 
			
		||||
------------------
 | 
			
		||||
 | 
			
		||||
Thread support in Mesa has been rewritten.  The glthread.[ch] files
 | 
			
		||||
replace mthreads.[ch].  Thread safety is always enabled (on platforms
 | 
			
		||||
which support threads, that is).  There is virtually no performance
 | 
			
		||||
penalty for typical single-thread applications.  See the glapi.c
 | 
			
		||||
file for details.
 | 
			
		||||
 | 
			
		||||
The Xlib driver (XMesa) is now thread-safe as well.  Be sure to
 | 
			
		||||
call XInitThreads() in your app first.  See the xdemos/glthreads.c
 | 
			
		||||
demo for an example.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Make configuration changes
 | 
			
		||||
--------------------------
 | 
			
		||||
 | 
			
		||||
If you use the old-style (non GNU automake) method to build Mesa note
 | 
			
		||||
that several of the configuration names have changed:
 | 
			
		||||
 | 
			
		||||
   Old name        New name
 | 
			
		||||
   -------------   ----------------
 | 
			
		||||
   linux-elf       linux
 | 
			
		||||
   linux           linux-static
 | 
			
		||||
   linux-386-elf   linux-386
 | 
			
		||||
   linux-386       linux-386-static
 | 
			
		||||
   etc.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
New extensions
 | 
			
		||||
--------------
 | 
			
		||||
 | 
			
		||||
GL_ARB_transpose_matrix
 | 
			
		||||
	Adds glLoadTransposeMatrixARB() and glMultTransposeMatrixARB()
 | 
			
		||||
        functions.
 | 
			
		||||
 | 
			
		||||
GL_ARB_texture_cube_map
 | 
			
		||||
	For cube-based reflection mapping.
 | 
			
		||||
 | 
			
		||||
GL_EXT_texture_add_env
 | 
			
		||||
	Adds GL_ADD texture environment mode.
 | 
			
		||||
	See http://www.berkelium.com/OpenGL/EXT/texture_env_add.txt
 | 
			
		||||
 | 
			
		||||
GL_EXT_texture_lod_bias
 | 
			
		||||
	Allows mipmapped texture blurring and sharpening.
 | 
			
		||||
 | 
			
		||||
GLX_EXT_visual_rating extension
 | 
			
		||||
	This extension has no effect in stand-alone Mesa (used for DRI).
 | 
			
		||||
 | 
			
		||||
GL_HP_occlusion_test
 | 
			
		||||
	Used for bounding box occlusion testing (see demos/occlude.c).
 | 
			
		||||
 | 
			
		||||
GL_SGIX_pixel_texture / GL_SGIS_pixel_texture
 | 
			
		||||
	Lets glDraw/CopyPixels draw a texture coordinate image.
 | 
			
		||||
 | 
			
		||||
GL_SGI_color_matrix
 | 
			
		||||
	Adds a color matrix and another set of scale and bias parameters
 | 
			
		||||
	to the glDraw/CopyPixels paths.
 | 
			
		||||
 | 
			
		||||
GL_SGI_color_table
 | 
			
		||||
	Adds additional color tables to the glDraw/Read/CopyPixels paths.
 | 
			
		||||
 | 
			
		||||
GL_EXT_histogram
 | 
			
		||||
	Compute histograms for glDraw/Read/CopyPixels.
 | 
			
		||||
 | 
			
		||||
GL_EXT_blend_func_separate
 | 
			
		||||
	This is the same as GL_INGR_blend_func_separate.
 | 
			
		||||
 | 
			
		||||
GL_ARB_texture_cube_mapping
 | 
			
		||||
	6-face cube mapping, nicer than sphere mapping
 | 
			
		||||
 | 
			
		||||
GL_EXT_texture_env_combine
 | 
			
		||||
	For advanced texture environment effects.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Documentation for all these functions can be found at
 | 
			
		||||
http://oss.sgi.com/projects/ogl-sample/registry/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
GLX_SGI_make_current_read functionality
 | 
			
		||||
---------------------------------------
 | 
			
		||||
 | 
			
		||||
The functionality of this extension is needed for GLX 1.3 (and required
 | 
			
		||||
for the Linux/OpenGL standards base).
 | 
			
		||||
 | 
			
		||||
Implementing this function required a **DEVICE DRIVER CHANGE**.
 | 
			
		||||
The old SetBuffer() function has been replaced by SetReadBuffer() and
 | 
			
		||||
SetDrawBuffer().  All device drivers will have to be updated because
 | 
			
		||||
of this change.
 | 
			
		||||
 | 
			
		||||
The new function, glXMakeContextCurrent(), in GLX 1.3 now works in Mesa.
 | 
			
		||||
The xdemos/wincopy.c program demonstrates it.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Image-related code changes
 | 
			
		||||
--------------------------
 | 
			
		||||
 | 
			
		||||
The imaging path code used by glDrawPixels, glTexImage[123]D,
 | 
			
		||||
glTexSubImage[123], etc has been rewritten.  It's now faster,
 | 
			
		||||
uses less memory and has several bug fixes.  This work was
 | 
			
		||||
actually started in Mesa 3.1 with the glTexImage paths but has now
 | 
			
		||||
been carried over to glDrawPixels as well.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Device driver interface changes
 | 
			
		||||
-------------------------------
 | 
			
		||||
 | 
			
		||||
Added new functions for hardware stencil buffer support:
 | 
			
		||||
   WriteStencilSpan
 | 
			
		||||
   ReadStencilSpan
 | 
			
		||||
   WriteStencilPixels
 | 
			
		||||
   ReadStencilPixels
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Removed old depth buffer functions:
 | 
			
		||||
   AllocDepthBuffer
 | 
			
		||||
   DepthTestSpan
 | 
			
		||||
   DepthTestPixels
 | 
			
		||||
   ReadDepthSpanFloat
 | 
			
		||||
   ReadDepthSpanInt
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Added new depth buffer functions:
 | 
			
		||||
   WriteDepthSpan
 | 
			
		||||
   ReadDepthSpan
 | 
			
		||||
   WriteDepthPixels
 | 
			
		||||
   ReadDepthPixels
 | 
			
		||||
 | 
			
		||||
   These functions always read/write 32-bit GLuints.  This will allow
 | 
			
		||||
   drivers to have anywhere from 0 to 32-bit Z buffers without
 | 
			
		||||
   recompiling for 16 vs 32 bits as was previously needed.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
New texture image functions
 | 
			
		||||
   The entire interface for texture image specification has been updated.
 | 
			
		||||
   With the new functions, it's optional for Mesa to keep an internal copy
 | 
			
		||||
   of all textures.  Texture download should be a lot faster when the extra
 | 
			
		||||
   copy isn't made.
 | 
			
		||||
 | 
			
		||||
Misc changes
 | 
			
		||||
   TexEnv now takes a target argument
 | 
			
		||||
   Removed UseGlobalTexturePalette (use Enable function instead)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Also added
 | 
			
		||||
   ReadPixels
 | 
			
		||||
   CopyPixels
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
The SetBufffer function has been replaced by SetDrawBuffer and
 | 
			
		||||
SetReadBuffer functions.  This lets core Mesa independently
 | 
			
		||||
specify which buffer is to be used for reading and which for
 | 
			
		||||
drawing.
 | 
			
		||||
 | 
			
		||||
The Clear function's mask parameter has changed.  Instead of
 | 
			
		||||
mask being the flags specified by the user to glClear, the
 | 
			
		||||
mask is now a bitmask of the DD_*_BIT flags in dd.h.  Now
 | 
			
		||||
multiple color buffers can be specified for clearing (ala
 | 
			
		||||
glDrawBuffers).  The driver's Clear function must also
 | 
			
		||||
check the glColorMask glIndexMask, and glStencilMask settings
 | 
			
		||||
and do the right thing.  See the X/Mesa, OS/Mesa, or FX/Mesa
 | 
			
		||||
drivers for examples.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
The depth buffer changes shouldn't be hard to make for existing
 | 
			
		||||
drivers.  In fact, it should simply the code.  Be careful with
 | 
			
		||||
the depthBits value passed to gl_create_context().  1 is a bad
 | 
			
		||||
value!  It should normally be 0, 16, 24, or 32.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
gl_create_framebuffer() takes new arguments which explicitly tell
 | 
			
		||||
core Mesa which ancillary buffers (depth, stencil, accum, alpha)
 | 
			
		||||
should be implemented in software.  Mesa hardware drivers should
 | 
			
		||||
carefully set these flags depending on which buffers are in the
 | 
			
		||||
graphics card.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Internal constants
 | 
			
		||||
------------------
 | 
			
		||||
 | 
			
		||||
Point and line size range and granularity limits are now stored
 | 
			
		||||
in the gl_constants struct, which is the Const member of GLcontext.
 | 
			
		||||
The limits are initialized from values in config.h but may be
 | 
			
		||||
overridden by device drivers to reflect the limits of that driver's
 | 
			
		||||
hardware.
 | 
			
		||||
 | 
			
		||||
Also added constants for NumAuxBuffers and SubPixelBits.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
OpenGL Conformance
 | 
			
		||||
------------------
 | 
			
		||||
 | 
			
		||||
Mesa now passes all the OpenGL 1.1 conformance tests, except for
 | 
			
		||||
antialiased lines.  AA lines fail on some, but not all, the tests.
 | 
			
		||||
In order to fix the remaining failures, a new AA line algorithm will
 | 
			
		||||
be needed (which computes coverage values for end-point fragments).
 | 
			
		||||
This will be done for Mesa 3.5/3.6.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
OpenGL 1.2 GL_ARB_imaging subset
 | 
			
		||||
--------------------------------
 | 
			
		||||
 | 
			
		||||
Mesa 3.3 implements all the features of GL_ARB_imaging except for
 | 
			
		||||
image convolution.  This will (hopefully) be done for Mesa 3.5/3.6.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: RELNOTES-3.3,v 1.8 2000/07/21 16:26:41 brianp Exp $
 | 
			
		||||
							
								
								
									
										22
									
								
								docs/RELNOTES-3.4
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								docs/RELNOTES-3.4
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
 | 
			
		||||
                         Mesa 3.4 release notes
 | 
			
		||||
 | 
			
		||||
                             November 3, 2000
 | 
			
		||||
 | 
			
		||||
                             PLEASE READ!!!!
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Introduction
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
Mesa uses an even/odd version number scheme like the Linux kernel.
 | 
			
		||||
Odd numbered versions (such as 3.3) designate new developmental releases.
 | 
			
		||||
Even numbered versions (such as 3.4) designate stable releases.
 | 
			
		||||
 | 
			
		||||
Mesa 3.4 simply fixes bugs found in the Mesa 3.3 release.  For details,
 | 
			
		||||
see the VERSIONS file.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: RELNOTES-3.4,v 1.1.4.1 2002/03/23 02:36:52 brianp Exp $
 | 
			
		||||
							
								
								
									
										22
									
								
								docs/RELNOTES-3.4.1
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								docs/RELNOTES-3.4.1
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
 | 
			
		||||
                         Mesa 3.4.1 release notes
 | 
			
		||||
 | 
			
		||||
                             February 9, 2001
 | 
			
		||||
 | 
			
		||||
                              PLEASE READ!!!!
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Introduction
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
Mesa uses an even/odd version number scheme like the Linux kernel.
 | 
			
		||||
Odd numbered versions (such as 3.3) designate new developmental releases.
 | 
			
		||||
Even numbered versions (such as 3.4) designate stable releases.
 | 
			
		||||
 | 
			
		||||
Mesa 3.4.1 is a maintenance release that simply fixes bugs found since
 | 
			
		||||
the Mesa 3.4 release.  For details, see the VERSIONS file.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: RELNOTES-3.4.1,v 1.2 2001/05/23 14:45:01 brianp Exp $
 | 
			
		||||
							
								
								
									
										22
									
								
								docs/RELNOTES-3.4.2
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								docs/RELNOTES-3.4.2
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
 | 
			
		||||
                         Mesa 3.4.2 release notes
 | 
			
		||||
 | 
			
		||||
                               May 17, 2001
 | 
			
		||||
 | 
			
		||||
                              PLEASE READ!!!!
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Introduction
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
Mesa uses an even/odd version number scheme like the Linux kernel.
 | 
			
		||||
Odd numbered versions (such as 3.3) designate new developmental releases.
 | 
			
		||||
Even numbered versions (such as 3.4) designate stable releases.
 | 
			
		||||
 | 
			
		||||
Mesa 3.4.2 is a maintenance release that simply fixes bugs found since
 | 
			
		||||
the Mesa 3.4.1 release.  For details, see the VERSIONS file.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: RELNOTES-3.4.2,v 1.2 2001/05/23 14:45:01 brianp Exp $
 | 
			
		||||
							
								
								
									
										228
									
								
								docs/RELNOTES-3.5
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										228
									
								
								docs/RELNOTES-3.5
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,228 @@
 | 
			
		||||
 | 
			
		||||
                         Mesa 3.5 release notes
 | 
			
		||||
 | 
			
		||||
                             June 21, 2001
 | 
			
		||||
 | 
			
		||||
                             PLEASE READ!!!!
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Introduction
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
Mesa uses an even/odd version number scheme like the Linux kernel.
 | 
			
		||||
Odd numbered versions (such as 3.5) designate new developmental releases.
 | 
			
		||||
Even numbered versions (such as 3.4) designate stable releases.
 | 
			
		||||
 | 
			
		||||
The biggest change in Mesa 3.5 is a complete overhaul of the source
 | 
			
		||||
code in order to make it more modular.  This was driven by the DRI
 | 
			
		||||
hardware drivers.  It simplifies the DRI drivers and opens the door
 | 
			
		||||
to hardware transform/clip/lighting (TCL).  Keith Whitwell can take
 | 
			
		||||
the credit for that.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Driver Support
 | 
			
		||||
--------------
 | 
			
		||||
 | 
			
		||||
The device driver interface in Mesa 3.5 has changed a lot since Mesa 3.4
 | 
			
		||||
Not all of the older Mesa drivers have been updated.  Here's the status:
 | 
			
		||||
 | 
			
		||||
Driver			Status
 | 
			
		||||
----------------------	-----------
 | 
			
		||||
XMesa (Xlib)		updated
 | 
			
		||||
OSMesa (off-screen)	updated
 | 
			
		||||
FX (3dfx Voodoo1/2)	updated
 | 
			
		||||
SVGA			updated
 | 
			
		||||
GGI			not updated
 | 
			
		||||
Windows/Win32		not updated
 | 
			
		||||
DOS/DJGPP		not updated
 | 
			
		||||
BeOS			not updated
 | 
			
		||||
Allegro			not updated
 | 
			
		||||
D3D			not updated
 | 
			
		||||
DOS			not updated
 | 
			
		||||
 | 
			
		||||
We're looking for volunteers to update the remaining drivers.  Please
 | 
			
		||||
post to the Mesa3d-dev mailing list if you can help.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
GLU 1.3
 | 
			
		||||
-------
 | 
			
		||||
 | 
			
		||||
Mesa 3.5 includes the SGI Sample Implementation (SI) GLU library.
 | 
			
		||||
This version of GLU supports the GLU 1.3 specification.  The old
 | 
			
		||||
Mesa GLU library implemented the 1.1 specification.  The SI GLU
 | 
			
		||||
library should work much better.
 | 
			
		||||
 | 
			
		||||
You'll need a C++ compiler to compile the SI GLU library.  This may
 | 
			
		||||
be a problem on some systems.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
New Extensions
 | 
			
		||||
--------------
 | 
			
		||||
 | 
			
		||||
GL_EXT_convolution
 | 
			
		||||
	Adds image convolution to glRead/Copy/DrawPixels/TexImage.
 | 
			
		||||
 | 
			
		||||
GL_ARB_imaging
 | 
			
		||||
	This is the optional imaging subset of OpenGL 1.2.
 | 
			
		||||
	It's the GL_EXT_convolution, GL_HP_convolution_border_modes,
 | 
			
		||||
	GL_EXT_histogram, GL_EXT_color_table, GL_EXT_color_subtable
 | 
			
		||||
	GL_EXT_blend_color, GL_EXT_blend_minmax, GL_EXT_blend_subtract
 | 
			
		||||
	and GL_SGI_color_matrix extensions all rolled together.
 | 
			
		||||
	This is supported in all software renderers but not in all
 | 
			
		||||
	hardware drivers (3dfx for example).
 | 
			
		||||
 | 
			
		||||
GL_ARB_texture_compression
 | 
			
		||||
	This is supported in Mesa but only used by the 3dfx DRI drivers
 | 
			
		||||
	for Voodoo4 and later.
 | 
			
		||||
 | 
			
		||||
GL_ARB_texture_env_add
 | 
			
		||||
	This is identical to GL_EXT_texture_env_add.
 | 
			
		||||
 | 
			
		||||
GL_NV_blend_square
 | 
			
		||||
	Adds extra blend source and dest factors which allow squaring
 | 
			
		||||
	of color values.
 | 
			
		||||
 | 
			
		||||
GL_EXT_fog_coord
 | 
			
		||||
	Allows specification of a per-vertex fog coordinate instead of
 | 
			
		||||
	having fog always computed from the eye distance.
 | 
			
		||||
 | 
			
		||||
GL_EXT_secondary_color
 | 
			
		||||
	Allows specifying the secondary (specular) color for each vertex
 | 
			
		||||
	instead of getting it only from lighting in GL_SEPARATE_SPECULAR_COLOR
 | 
			
		||||
	mode.
 | 
			
		||||
 | 
			
		||||
GL_ARB_texture_env_combine
 | 
			
		||||
	Basically the same as GL_EXT_texture_env_combine
 | 
			
		||||
 | 
			
		||||
GL_ARB_texture_env_add extension
 | 
			
		||||
	Texture addition mode.
 | 
			
		||||
 | 
			
		||||
GL_ARB_texture_env_dot3 extension
 | 
			
		||||
	Dot product texture environment.
 | 
			
		||||
 | 
			
		||||
GL_ARB_texture_border_clamp
 | 
			
		||||
	Adds GL_CLAMP_TO_BORDER_ARB texture wrap mode
 | 
			
		||||
 | 
			
		||||
GL_SGIX_depth_texture, GL_SGIX_shadow and GL_SGIX_shadow_ambient
 | 
			
		||||
	Implements a shadow casting algorithm based on depth map textures
 | 
			
		||||
 | 
			
		||||
GL_SGIS_generate_mipmap
 | 
			
		||||
	Automatically generate lower mipmap images whenever the base mipmap
 | 
			
		||||
	image is changed with glTexImage, glCopyTexImage, etc.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
libOSMesa.so
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
libOSMesa.so is a new library which contains the OSMesa interface for
 | 
			
		||||
off-screen rendering.  Apps which need the OSMesa interface should link
 | 
			
		||||
with both -lOSMesa and -lGL.  This change was made so that stand-alone
 | 
			
		||||
Mesa works the same way as XFree86/DRI's libGL.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Device Driver Changes / Core Mesa Changes
 | 
			
		||||
-----------------------------------------
 | 
			
		||||
 | 
			
		||||
The ctx->Driver.LogicOp() function has been removed.  It used to
 | 
			
		||||
be called during state update in order to determine if the driver
 | 
			
		||||
could do glLogicOp() operations, and if not, set the SWLogicOpEnabled
 | 
			
		||||
flag.  Drivers should instead examine the LogicOp state themselves
 | 
			
		||||
and choose specialized point, line, and triangle functions appropriately,
 | 
			
		||||
or fall back to software rendering.  The Xlib driver was the only driver
 | 
			
		||||
to use this function.  And since the Xlib driver no longer draws
 | 
			
		||||
points, lines or triangles using Xlib, the LogicOp function isn't needed.
 | 
			
		||||
 | 
			
		||||
The ctx->Driver.Dither() function has been removed.  Drivers should
 | 
			
		||||
detect dither enable/disable via ctx->Driver.Enable() instead.
 | 
			
		||||
 | 
			
		||||
The ctx->Driver.IndexMask() and ctx->Driver.ColorMask() functions
 | 
			
		||||
are now just called from glIndexMask and glColorMask like the other
 | 
			
		||||
GL state-changing functions.  They are no longer called from inside
 | 
			
		||||
gl_update_state().  Also, they now return void.  The change was made
 | 
			
		||||
mostly for sake of uniformity.
 | 
			
		||||
 | 
			
		||||
The NEW_DRVSTATE[0123] flags have been removed.  They weren't being used
 | 
			
		||||
and are obsolete w.r.t. the way state updates are done in DRI drivers.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Removed obsolete gl_create_visual() and gl_destroy_visual().
 | 
			
		||||
 | 
			
		||||
Renamed functions (new namespace):
 | 
			
		||||
 | 
			
		||||
old				new
 | 
			
		||||
gl_create_framebuffer		_mesa_create_framebuffer
 | 
			
		||||
gl_destroy_framebuffer		_mesa_destroy_framebuffer
 | 
			
		||||
gl_create_context		_mesa_create_context
 | 
			
		||||
gl_destroy_context		_mesa_destroy_context
 | 
			
		||||
gl_context_initialize		_mesa_context_initialize
 | 
			
		||||
gl_copy_context			_mesa_copy_context
 | 
			
		||||
gl_make_current			_mesa_make_current
 | 
			
		||||
gl_make_current2		_mesa_make_current2
 | 
			
		||||
gl_get_current_context		_mesa_get_current_context
 | 
			
		||||
gl_flush_vb			_mesa_flush_vb
 | 
			
		||||
gl_warning			_mesa_warning
 | 
			
		||||
gl_compile_error		_mesa_compile_error
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
All the drivers have been updated, but not all of them have been
 | 
			
		||||
tested since I can't test some platforms (DOS, Windows, Allegro, etc).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
X/Mesa Driver
 | 
			
		||||
-------------
 | 
			
		||||
 | 
			
		||||
The source files for the X/Mesa driver in src/X have been renamed.
 | 
			
		||||
The xmesa[1234].c files are gone.  The new files are xm_api.c,
 | 
			
		||||
xm_dd.c, xm_line.c, xm_span.c and xm_tri.c.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Multitexture
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
Eight texture units are now supported by default.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
OpenGL SI related changes
 | 
			
		||||
-------------------------
 | 
			
		||||
 | 
			
		||||
In an effort to make Mesa's internal interfaces more like the OpenGL
 | 
			
		||||
SI interfaces, a number of changes have been made:
 | 
			
		||||
 | 
			
		||||
1. Importing the SI's glcore.h file which defines a number of
 | 
			
		||||
interface structures like __GLimports and __GLexports.
 | 
			
		||||
 | 
			
		||||
2. Renamed "struct gl_context" to "struct __GLcontextRec".
 | 
			
		||||
 | 
			
		||||
3. Added __glCoreCreateContext() and __glCoreNopDispatch() functions.
 | 
			
		||||
 | 
			
		||||
4. The GLcontext member Visual is no longer a pointer.
 | 
			
		||||
 | 
			
		||||
5. New file: imports.c to setup default import functions for Mesa.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
16-bit color channels
 | 
			
		||||
---------------------
 | 
			
		||||
 | 
			
		||||
There's experimental support for 16-bit color channels (64-bit pixels)
 | 
			
		||||
in Mesa 3.5.  Only the OSMesa interface can be used for 16-bit rendering.
 | 
			
		||||
Type "make linux-osmesa16" in the top-level directory to build the
 | 
			
		||||
special libOSMesa16.so library.
 | 
			
		||||
 | 
			
		||||
This hasn't been tested very thoroughly yet so please file bug reports
 | 
			
		||||
if you have trouble.
 | 
			
		||||
 | 
			
		||||
In the future I hope to implement support for 32-bit, floating point
 | 
			
		||||
color channels.
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: RELNOTES-3.5,v 1.14 2001/06/20 19:02:48 brianp Exp $
 | 
			
		||||
							
								
								
									
										163
									
								
								docs/RELNOTES-4.0
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										163
									
								
								docs/RELNOTES-4.0
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,163 @@
 | 
			
		||||
 | 
			
		||||
                           Mesa 4.0 release notes
 | 
			
		||||
 | 
			
		||||
                             October 18, 2001
 | 
			
		||||
 | 
			
		||||
                              PLEASE READ!!!!
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Introduction
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
Mesa uses an even/odd version number scheme like the Linux kernel.
 | 
			
		||||
Odd numbered versions (such as 3.3) designate new developmental releases.
 | 
			
		||||
Even numbered versions (such as 3.4) designate stable releases.
 | 
			
		||||
 | 
			
		||||
Mesa version 4.0 signifies two things:
 | 
			
		||||
 | 
			
		||||
  1. A stabilization of the 3.5 development release
 | 
			
		||||
  2. Implementation of the OpenGL 1.3 specification
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Note that the Mesa major version number is incremented with the OpenGL
 | 
			
		||||
minor version number:
 | 
			
		||||
 | 
			
		||||
   Mesa 1.x  ==  OpenGL 1.0
 | 
			
		||||
   Mesa 2.x  ==  OpenGL 1.1
 | 
			
		||||
   Mesa 3.x  ==  OpenGL 1.2
 | 
			
		||||
   Mesa 4.x  ==  OpenGL 1.3
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
New Features
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
Mesa 3.5 already had all the new features of OpenGL 1.3, implemented as
 | 
			
		||||
extensions.  These extensions were simply promoted to standard features:
 | 
			
		||||
 | 
			
		||||
   GL_ARB_multisample
 | 
			
		||||
   GL_ARB_multitexture
 | 
			
		||||
   GL_ARB_texture_border_clamp
 | 
			
		||||
   GL_ARB_texture_compression
 | 
			
		||||
   GL_ARB_texture_cube_map
 | 
			
		||||
   GL_ARB_texture_env_add
 | 
			
		||||
   GL_ARB_texture_env_combine
 | 
			
		||||
   GL_ARB_texture_env_dot3
 | 
			
		||||
   GL_ARB_transpose_matrix
 | 
			
		||||
 | 
			
		||||
In Mesa 4.0 the functions defined by these extensions are now available
 | 
			
		||||
without the "ARB" suffix.  For example, glLoadTransposeMatrixf() is now
 | 
			
		||||
a standard API function.  The new functions in OpenGL 1.3 and Mesa 4.0 are:
 | 
			
		||||
 | 
			
		||||
   glActiveTexture
 | 
			
		||||
   glClientActiveTexture
 | 
			
		||||
   glCompressedTexImage1D
 | 
			
		||||
   glCompressedTexImage2D
 | 
			
		||||
   glCompressedTexImage3D
 | 
			
		||||
   glCompressedTexSubImage1D
 | 
			
		||||
   glCompressedTexSubImage2D
 | 
			
		||||
   glCompressedTexSubImage3D
 | 
			
		||||
   glGetCompressedTexImage
 | 
			
		||||
   glLoadTransposeMatrixd
 | 
			
		||||
   glLoadTransposeMatrixf
 | 
			
		||||
   glMultiTexCoord1d
 | 
			
		||||
   glMultiTexCoord1dv
 | 
			
		||||
   glMultiTexCoord1f
 | 
			
		||||
   glMultiTexCoord1fv
 | 
			
		||||
   glMultiTexCoord1i
 | 
			
		||||
   glMultiTexCoord1iv
 | 
			
		||||
   glMultiTexCoord1s
 | 
			
		||||
   glMultiTexCoord1sv
 | 
			
		||||
   glMultiTexCoord2d
 | 
			
		||||
   glMultiTexCoord2dv
 | 
			
		||||
   glMultiTexCoord2f
 | 
			
		||||
   glMultiTexCoord2fv
 | 
			
		||||
   glMultiTexCoord2i
 | 
			
		||||
   glMultiTexCoord2iv
 | 
			
		||||
   glMultiTexCoord2s
 | 
			
		||||
   glMultiTexCoord2sv
 | 
			
		||||
   glMultiTexCoord3d
 | 
			
		||||
   glMultiTexCoord3dv
 | 
			
		||||
   glMultiTexCoord3f
 | 
			
		||||
   glMultiTexCoord3fv
 | 
			
		||||
   glMultiTexCoord3i
 | 
			
		||||
   glMultiTexCoord3iv
 | 
			
		||||
   glMultiTexCoord3s
 | 
			
		||||
   glMultiTexCoord3sv
 | 
			
		||||
   glMultiTexCoord4d
 | 
			
		||||
   glMultiTexCoord4dv
 | 
			
		||||
   glMultiTexCoord4f
 | 
			
		||||
   glMultiTexCoord4fv
 | 
			
		||||
   glMultiTexCoord4i
 | 
			
		||||
   glMultiTexCoord4iv
 | 
			
		||||
   glMultiTexCoord4s
 | 
			
		||||
   glMultiTexCoord4sv
 | 
			
		||||
   glMultTransposeMatrixd
 | 
			
		||||
   glMultTransposeMatrixf
 | 
			
		||||
   glSampleCoverage
 | 
			
		||||
   glSamplePass
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
GLX 1.4 is the companion to OpenGL 1.3.  The only new features in GLX 1.4
 | 
			
		||||
are support for multisampling and the GLX_ARB_get_proc_address extension.
 | 
			
		||||
glXGetProcAddress() is the only new function in GLX 1.4.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Multisample and Texture Compression
 | 
			
		||||
-----------------------------------
 | 
			
		||||
 | 
			
		||||
The OpenGL 1.3 specification allows the multisample and texture compression
 | 
			
		||||
features to essentially be no-ops.  For example, if you query for multisample
 | 
			
		||||
support you'll find none, but the API functions work.
 | 
			
		||||
 | 
			
		||||
Similarly, texture compression is not implemented by any of the software
 | 
			
		||||
drivers but you can specify a generic compressed texture format (like
 | 
			
		||||
GL_COMPRESSED_RGBA) to glTexImage2D and it'll be accepted.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Device Drivers
 | 
			
		||||
--------------
 | 
			
		||||
 | 
			
		||||
Mesa advertises itself as either OpenGL 1.2 or OpenGL 1.3 depending on the
 | 
			
		||||
device driver.  If the driver enables all the ARB extensions which are part
 | 
			
		||||
of OpenGL 1.3 then glGetString(GL_VERSION) will return "1.3".  Otherwise,
 | 
			
		||||
it'll return "1.2".
 | 
			
		||||
 | 
			
		||||
A number of Mesa's software drivers haven't been actively maintained for
 | 
			
		||||
some time.  We rely on volunteers to maintain many of the drivers.
 | 
			
		||||
Here's the current status of all included drivers:
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Driver			Status
 | 
			
		||||
----------------------	---------------------
 | 
			
		||||
XMesa (Xlib)		implements OpenGL 1.3
 | 
			
		||||
OSMesa (off-screen)	implements OpenGL 1.3
 | 
			
		||||
FX (3dfx Voodoo1/2)	implements OpenGL 1.3
 | 
			
		||||
SVGA			implements OpenGL 1.3
 | 
			
		||||
Wind River UGL		implements OpenGL 1.3
 | 
			
		||||
Windows/Win32		implements OpenGL 1.3
 | 
			
		||||
GGI			needs updating
 | 
			
		||||
DOS/DJGPP		needs updating
 | 
			
		||||
BeOS			needs updating
 | 
			
		||||
Allegro			needs updating
 | 
			
		||||
D3D			needs updating
 | 
			
		||||
DOS			needs updating
 | 
			
		||||
 | 
			
		||||
Special thanks go to Karl Schultz for updating the Windows driver.
 | 
			
		||||
 | 
			
		||||
The XFree86/DRI drivers	have not yet been updated to use Mesa 4.0 as of
 | 
			
		||||
September 2001, but that should happen eventually.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Other Changes
 | 
			
		||||
-------------
 | 
			
		||||
 | 
			
		||||
See the VERSIONS file for more details about bug fixes, etc. in Mesa 4.0.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: RELNOTES-4.0,v 3.2 2001/10/17 14:59:21 brianp Exp $
 | 
			
		||||
							
								
								
									
										22
									
								
								docs/RELNOTES-4.0.1
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								docs/RELNOTES-4.0.1
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
 | 
			
		||||
                          Mesa 4.0.1 release notes
 | 
			
		||||
 | 
			
		||||
                             December 17, 2001
 | 
			
		||||
 | 
			
		||||
                              PLEASE READ!!!!
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Introduction
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
Mesa uses an even/odd version number scheme like the Linux kernel.
 | 
			
		||||
Odd numbered versions (such as 3.3) designate new developmental releases.
 | 
			
		||||
Even numbered versions (such as 3.4) designate stable releases.
 | 
			
		||||
 | 
			
		||||
Mesa 4.0.1 only contains bug fixes since version 4.0.
 | 
			
		||||
 | 
			
		||||
See the docs/VERSIONS file for the list of bug fixes.
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: RELNOTES-4.0.1,v 1.1.2.2 2001/12/17 19:43:38 brianp Exp $
 | 
			
		||||
							
								
								
									
										50
									
								
								docs/RELNOTES-4.0.2
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								docs/RELNOTES-4.0.2
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,50 @@
 | 
			
		||||
 | 
			
		||||
                          Mesa 4.0.2 release notes
 | 
			
		||||
 | 
			
		||||
                               April 2, 2002
 | 
			
		||||
 | 
			
		||||
                              PLEASE READ!!!!
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Introduction
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
Mesa uses an even/odd version number scheme like the Linux kernel.
 | 
			
		||||
Odd numbered versions (such as 3.3) designate new developmental releases.
 | 
			
		||||
Even numbered versions (such as 3.4) designate stable releases.
 | 
			
		||||
 | 
			
		||||
Mesa 4.0.2 only contains bug fixes and a new DOS driver since version 4.0.1.
 | 
			
		||||
 | 
			
		||||
See the docs/VERSIONS file for the list of bug fixes.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Device Drivers
 | 
			
		||||
--------------
 | 
			
		||||
 | 
			
		||||
Mesa advertises itself as either OpenGL 1.2 or OpenGL 1.3 depending on the
 | 
			
		||||
device driver.  If the driver enables all the ARB extensions which are part
 | 
			
		||||
of OpenGL 1.3 then glGetString(GL_VERSION) will return "1.3".  Otherwise,
 | 
			
		||||
it'll return "1.2".
 | 
			
		||||
 | 
			
		||||
A number of Mesa's software drivers haven't been actively maintained for
 | 
			
		||||
some time.  We rely on volunteers to maintain many of the drivers.
 | 
			
		||||
Here's the current status of all included drivers:
 | 
			
		||||
 | 
			
		||||
Driver			Status
 | 
			
		||||
----------------------	---------------------
 | 
			
		||||
XMesa (Xlib)		implements OpenGL 1.3
 | 
			
		||||
OSMesa (off-screen)	implements OpenGL 1.3
 | 
			
		||||
FX (3dfx Voodoo1/2)	implements OpenGL 1.3
 | 
			
		||||
SVGA			implements OpenGL 1.3
 | 
			
		||||
Wind River UGL		implements OpenGL 1.3
 | 
			
		||||
Windows/Win32		implements OpenGL 1.3
 | 
			
		||||
DOS/DJGPP		implements OpenGL 1.3 (new in Mesa 4.0.2)
 | 
			
		||||
GGI			needs updating
 | 
			
		||||
BeOS			needs updating
 | 
			
		||||
Allegro			needs updating
 | 
			
		||||
D3D			needs updating
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: RELNOTES-4.0.2,v 1.1.2.3 2002/04/01 16:54:11 brianp Exp $
 | 
			
		||||
							
								
								
									
										52
									
								
								docs/RELNOTES-4.0.3
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								docs/RELNOTES-4.0.3
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,52 @@
 | 
			
		||||
 | 
			
		||||
                          Mesa 4.0.3 release notes
 | 
			
		||||
 | 
			
		||||
                               June 25, 2002
 | 
			
		||||
 | 
			
		||||
                              PLEASE READ!!!!
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Introduction
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
Mesa uses an even/odd version number scheme like the Linux kernel.
 | 
			
		||||
Odd numbered versions (such as 3.3) designate new developmental releases.
 | 
			
		||||
Even numbered versions (such as 3.4) designate stable releases.
 | 
			
		||||
 | 
			
		||||
Mesa 4.0.3 basically just contains bug fixes version 4.0.2.
 | 
			
		||||
 | 
			
		||||
See the docs/VERSIONS file for the list of bug fixes.
 | 
			
		||||
 | 
			
		||||
The GGI driver has been updated, thanks to Filip Spacek.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Device Drivers
 | 
			
		||||
--------------
 | 
			
		||||
 | 
			
		||||
Mesa advertises itself as either OpenGL 1.2 or OpenGL 1.3 depending on the
 | 
			
		||||
device driver.  If the driver enables all the ARB extensions which are part
 | 
			
		||||
of OpenGL 1.3 then glGetString(GL_VERSION) will return "1.3".  Otherwise,
 | 
			
		||||
it'll return "1.2".
 | 
			
		||||
 | 
			
		||||
A number of Mesa's software drivers haven't been actively maintained for
 | 
			
		||||
some time.  We rely on volunteers to maintain many of the drivers.
 | 
			
		||||
Here's the current status of all included drivers:
 | 
			
		||||
 | 
			
		||||
Driver			Status
 | 
			
		||||
----------------------	---------------------
 | 
			
		||||
XMesa (Xlib)		implements OpenGL 1.3
 | 
			
		||||
OSMesa (off-screen)	implements OpenGL 1.3
 | 
			
		||||
FX (3dfx Voodoo1/2)	implements OpenGL 1.3
 | 
			
		||||
SVGA			implements OpenGL 1.3
 | 
			
		||||
Wind River UGL		implements OpenGL 1.3
 | 
			
		||||
Windows/Win32		implements OpenGL 1.3
 | 
			
		||||
DOS/DJGPP		implements OpenGL 1.3 (new in Mesa 4.0.2)
 | 
			
		||||
GGI			implements OpenGL 1.3
 | 
			
		||||
BeOS			needs updating
 | 
			
		||||
Allegro			needs updating
 | 
			
		||||
D3D			needs updating
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: RELNOTES-4.0.3,v 1.1.2.3 2002/06/24 20:44:58 brianp Exp $
 | 
			
		||||
							
								
								
									
										28
									
								
								docs/RELNOTES-4.1
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								docs/RELNOTES-4.1
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
 | 
			
		||||
                            Mesa 4.1 release notes
 | 
			
		||||
 | 
			
		||||
                            <month>, <day>, <year>
 | 
			
		||||
 | 
			
		||||
                               PLEASE READ!!!!
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Introduction
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
Mesa uses an even/odd version number scheme like the Linux kernel.
 | 
			
		||||
Odd numbered versions (such as 4.1) designate new developmental releases.
 | 
			
		||||
Even numbered versions (such as 4.0) designate stable releases.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
New Features in Mesa 4.1
 | 
			
		||||
------------------------
 | 
			
		||||
 | 
			
		||||
<to be determined>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: RELNOTES-4.1,v 1.1 2001/10/22 22:57:23 brianp Exp $
 | 
			
		||||
							
								
								
									
										353
									
								
								docs/VERSIONS
									
									
									
									
									
								
							
							
						
						
									
										353
									
								
								docs/VERSIONS
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
			
		||||
$Id: VERSIONS,v 1.13 1999/09/19 20:09:00 tanner Exp $
 | 
			
		||||
$Id: VERSIONS,v 1.73.2.41 2002/10/02 17:36:59 brianp Exp $
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Mesa Version History
 | 
			
		||||
@@ -659,3 +659,354 @@ Mesa Version History
 | 
			
		||||
	- New library numbering: libGL.so.1.2.310
 | 
			
		||||
	- New subdirectories:  docs/ and bin/
 | 
			
		||||
	- New Makefile-system (autoconf,automake,libtool)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
3.1 final  December 14, 1999
 | 
			
		||||
    New:
 | 
			
		||||
	- added demos/gloss.c
 | 
			
		||||
	- added xdemos/glxdpyinfo.c
 | 
			
		||||
	- added GLX_ARB_get_proc_address extension
 | 
			
		||||
	- rewritten glTexImage code paths (faster, less memory, bug fixes)
 | 
			
		||||
    Bug Fixes:
 | 
			
		||||
	- several vertex array bug fixes
 | 
			
		||||
	- overlapping glCopyPixels with pixel zooming now works
 | 
			
		||||
	- glXUseXFont() bitmaps were vertically shifted by one pixel
 | 
			
		||||
	- glCopyPixels with pixel zooming now works
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
3.2 final  April 24, 2000
 | 
			
		||||
    Bug fixes:
 | 
			
		||||
	- fixed memcpy bugs in span.c
 | 
			
		||||
	- fixed missing glEnd problem in demos/tessdemo.c
 | 
			
		||||
	- fixed bug when clearing 24bpp Ximages
 | 
			
		||||
	- fixed clipping problem found in Unreal Tournament
 | 
			
		||||
	- fixed Loki's "ice bug" and "crazy triangles" seen in Heretic2
 | 
			
		||||
	- fixed Loki's 3dfx RGB vs BGR bug
 | 
			
		||||
	- fixed Loki's 3dfx smooth/flat shading bug in SoF
 | 
			
		||||
    Changes:
 | 
			
		||||
	- updated docs/README file
 | 
			
		||||
	- use bcopy() optimizations on FreeBSD
 | 
			
		||||
	- re-enabled the optimized persp_textured_triangle() function
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
3.2.1  July 19, 2000
 | 
			
		||||
    Bug fixes:
 | 
			
		||||
	- gluBuild2DMipmaps() didn't accept GL_BGRA
 | 
			
		||||
	- Fixed compile/makefile problems on IRIX
 | 
			
		||||
	- fixed segfault in 3dfx driver when using GL selection/feedback
 | 
			
		||||
	- no longer cull very, very tiny triangles
 | 
			
		||||
	- blending w/ drawbuffer==GL_FRONT_BACK caused segfault (sw rendering)
 | 
			
		||||
	- fixed Motif detection code in widgets-mesa/configure.in
 | 
			
		||||
	- glColorMaterial and glMaterial updates to emissive and ambient
 | 
			
		||||
	  didn't always work right
 | 
			
		||||
	- Specular highlights weren't always in the right place
 | 
			
		||||
	- clipped GL_LINE mode polygons had interior lines appear
 | 
			
		||||
	- blend term GL_ONE_MINUS_CONSTANT_ALPHA was broken
 | 
			
		||||
	- GL_NICEST fog didn't always work with flat shading
 | 
			
		||||
	- glRect commands in display lists were sometimes miscolored
 | 
			
		||||
	- Line Z offset didn't always work
 | 
			
		||||
	- fixed texgen normal vector problem (gloss's teapot)
 | 
			
		||||
	- numerous GL conformance bugs fixed
 | 
			
		||||
    Changes:
 | 
			
		||||
	- glColorMask(false, false, false, false) handled better/faster
 | 
			
		||||
	- reverted to old GLU polygon tessellator, GLU 1.1
 | 
			
		||||
	- updated Win32 build files
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
3.3  July 21, 2000
 | 
			
		||||
    New:
 | 
			
		||||
	- antialiased triangles now implemented
 | 
			
		||||
	- GL_EXT_texture_env_add texture mode extension
 | 
			
		||||
	- GLX 1.3 API
 | 
			
		||||
	- support for separate draw/read buffers (ie GL_SGI_make_current_read)
 | 
			
		||||
	- thread-safe API dispath
 | 
			
		||||
	- improved glxinfo program
 | 
			
		||||
	- demos/texdown program to measure texture download performance
 | 
			
		||||
	- glext.h header file
 | 
			
		||||
	- demos/geartrain program
 | 
			
		||||
	- GL_EXT_texture_lod_bias extension
 | 
			
		||||
	- demos/lodbias program
 | 
			
		||||
	- further optimized glRead/DrawPixels for 16-bit TrueColor X visuals
 | 
			
		||||
	- GLX_EXT_visual_rating extension (a no-op, however)
 | 
			
		||||
	- GL_HP_occlusion_test extension (for X and OS/Mesa drivers)
 | 
			
		||||
	- demos/occlude program
 | 
			
		||||
	- GL_SGIS_pixel_texture and GL_SGIX_pixel_texture extensions
 | 
			
		||||
	- demos/pixeltex program
 | 
			
		||||
	- GL_SGI_color_matrix extension
 | 
			
		||||
	- GL_SGI_color_table extension
 | 
			
		||||
	- GL_EXT_histogram extension
 | 
			
		||||
	- GL_ARB_texture_cube_map extension
 | 
			
		||||
	- added xdemos/glxheads and xdemos/manywin
 | 
			
		||||
	- demos/texenv.c demo
 | 
			
		||||
	- GL_EXT_texture_env_combine extension (by Holger Waechtler)
 | 
			
		||||
	- Xlib driver is now thread-safe (see xdemos/glthreads)
 | 
			
		||||
    Bug Fixes:
 | 
			
		||||
	- various GL conformance failures fixed since 3.2.1
 | 
			
		||||
    Changes:
 | 
			
		||||
	- gl.h now uses #defines instead of C enums for all tokens
 | 
			
		||||
	- glu.h now uses #defines instead of C enums for all tokens
 | 
			
		||||
	- moved programs from 3Dfx/demos/ into demos/ directory
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
3.4  November 3, 2000
 | 
			
		||||
    New:
 | 
			
		||||
	- optimized glDrawPixels for glPixelZoom(1,-1)
 | 
			
		||||
    Bug Fixes:
 | 
			
		||||
	- widgets-mesa/src/*.c files were missing from 3.3 distro
 | 
			
		||||
	- include/GL/mesa_wgl.h file was missing from 3.3 distro
 | 
			
		||||
	- fixed some Win32 compile problems
 | 
			
		||||
	- texture object priorities weren't getting initialized to 1.0
 | 
			
		||||
	- glAreTexturesResident return value was wrong when using hardware
 | 
			
		||||
	- glXUseXFont segfaulted when using 3dfx driver (via MESA_GLX_FX)
 | 
			
		||||
	- glReadPixels with GLushort packed types was broken
 | 
			
		||||
	- fixed a few bugs in the GL_EXT_texture_env_combine texture code
 | 
			
		||||
	- glPush/PopAttrib(GL_ENABLE_BIT) mishandled multi-texture enables
 | 
			
		||||
	- fixed some typos/bugs in the VB code
 | 
			
		||||
	- glDrawPixels(GL_COLOR_INDEX) to RGB window didn't work
 | 
			
		||||
	- optimized glDrawPixels paths weren't being used
 | 
			
		||||
	- per-fragment fog calculation didn't work without a Z buffer
 | 
			
		||||
	- improved blending accuracy, fixes Glean blendFunc test failures
 | 
			
		||||
	- glPixelStore(GL_PACK/UNPACK_SKIP_IMAGES) wasn't handled correctly
 | 
			
		||||
	- glXGetProcAddressARB() didn't always return the right address
 | 
			
		||||
	- gluBuild[12]DMipmaps() didn't grok the GL_BGR pixel format
 | 
			
		||||
	- texture matrix changes weren't always detected (GLUT projtex demo)
 | 
			
		||||
	- fixed random color problem in vertex fog code
 | 
			
		||||
	- fixed Glide-related bug that let Quake get a 24-bit Z buffer
 | 
			
		||||
    Changes:
 | 
			
		||||
	- finished internal support for compressed textures for DRI
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
3.4.1  February 14, 2001
 | 
			
		||||
    New:
 | 
			
		||||
	- fixed some Linux build problems
 | 
			
		||||
	- fixed some Windows build problems
 | 
			
		||||
	- GL_EXT_texture_env_dot3 extension (Gareth Hughes)
 | 
			
		||||
    Bug fixes:
 | 
			
		||||
	- added RENDER_START/RENDER_FINISH macros for glCopyTexImage in DRI
 | 
			
		||||
	- various state-update code changes needed for DRI bugs
 | 
			
		||||
	- disabled pixel transfer ops in glColorTable commands, not needed
 | 
			
		||||
	- fixed bugs in glCopyConvolutionFilter1D/2D, glGetConvolutionFilter
 | 
			
		||||
	- updated sources and fixed compile problems in widgets-mesa/
 | 
			
		||||
	- GLX_PBUFFER enum value was wrong in glx.h
 | 
			
		||||
	- fixed a glColorMaterial lighting bug
 | 
			
		||||
	- fixed bad args to Read/WriteStencilSpan in h/w stencil clear function
 | 
			
		||||
	- glXCopySubBufferMESA() Y position was off by one
 | 
			
		||||
	- Error checking of glTexSubImage3D() was broken (bug 128775)
 | 
			
		||||
	- glPopAttrib() didn't restore all derived Mesa state correctly
 | 
			
		||||
	- Better glReadPixels accuracy for 16bpp color - fixes lots of OpenGL
 | 
			
		||||
	  conformance problems at 16bpp.
 | 
			
		||||
	- clearing depth buffer with scissoring was broken, would segfault
 | 
			
		||||
	- OSMesaGetDepthBuffer() returned bad bytesPerValue value
 | 
			
		||||
	- fixed a line clipping bug (reported by Craig McDaniel)
 | 
			
		||||
	- fixed RGB color over/underflow bug for very tiny triangles
 | 
			
		||||
    Known problems:
 | 
			
		||||
	- NURBS or evaluator surfaces inside display lists don't always work
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
3.4.2  May 17, 2001
 | 
			
		||||
    Bug fixes:
 | 
			
		||||
	- deleting the currently bound texture could cause bad problems
 | 
			
		||||
	- using fog could result in random vertex alpha values
 | 
			
		||||
	- AA triangle rendering could touch pixels outside right window bound
 | 
			
		||||
	- fixed byteswapping problem in clear_32bit_ximage() function
 | 
			
		||||
	- fixed bugs in wglUseFontBitmapsA(), by Frank Warmerdam
 | 
			
		||||
	- fixed memory leak in glXUseXFont()
 | 
			
		||||
	- fragment sampling in AA triangle function was off by 1/2 pixel
 | 
			
		||||
	- Windows: reading pixels from framebuffer didn't always work
 | 
			
		||||
	- glConvolutionFilter2D could segfault or cause FP exception
 | 
			
		||||
	- fixed segfaults in FX and X drivers when using tex unit 1 but not 0
 | 
			
		||||
	- GL_NAND logicop didn't work right in RGBA mode
 | 
			
		||||
	- fixed a memory corruption bug in vertex buffer reset code
 | 
			
		||||
	- clearing the softwara alpha buffer with scissoring was broken
 | 
			
		||||
	- fixed a few color index mode fog bugs
 | 
			
		||||
	- fixed some bad assertions in color index mode
 | 
			
		||||
	- fixed FX line 'stipple' bug #420091
 | 
			
		||||
	- fixed stencil buffer clear width/height typo
 | 
			
		||||
	- fixed GL error glitches in gl[Client]ActiveTextureARB()
 | 
			
		||||
	- fixed Windows compilation problem in texutil.c
 | 
			
		||||
	- fixed 1/8-pixel AA triangle sampling error
 | 
			
		||||
    Changes:
 | 
			
		||||
	- optimized writing mono-colored pixel spans to X pixmaps
 | 
			
		||||
	- increased max viewport size to 2048 x 2048
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
3.5  June 21, 2001
 | 
			
		||||
    New:
 | 
			
		||||
	- internals of Mesa divided into modular pieces (Keith Whitwell)
 | 
			
		||||
	- 100% OpenGL 1.2 conformance (passes all conformance tests)
 | 
			
		||||
	- new AA line algorithm
 | 
			
		||||
	- GL_EXT_convolution extension
 | 
			
		||||
	- GL_ARB_imaging subset
 | 
			
		||||
	- OSMesaCreateContextExt() function
 | 
			
		||||
	- GL_ARB_texture_env_add extension (same as GL_EXT_texture_env_add)
 | 
			
		||||
	- GL_MAX_TEXTURE_UNITS_ARB now defaults to eight
 | 
			
		||||
	- GL_EXT_fog_coord extension (Keith Whitwell)
 | 
			
		||||
	- GL_EXT_secondary_color extension (Keith Whitwell)
 | 
			
		||||
	- GL_ARB_texture_env_add extension (same as GL_EXT_texture_env_add)
 | 
			
		||||
	- GL_SGIX_depth_texture extension
 | 
			
		||||
	- GL_SGIX_shadow and GL_SGIX_shadow_ambient extensions
 | 
			
		||||
	- demos/shadowtex.c demo of GL_SGIX_depth_texture and GL_SGIX_shadow
 | 
			
		||||
	- GL_ARB_texture_env_combine extension
 | 
			
		||||
	- GL_ARB_texture_env_dot3 extension
 | 
			
		||||
	- GL_ARB_texture_border_clamp (aka GL_SGIS_texture_border_clamp)
 | 
			
		||||
	- OSMesaCreateContextExt() function
 | 
			
		||||
	- libOSMesa.so library, contains the OSMesa driver interface
 | 
			
		||||
	- GL/glxext.h header file for GLX extensions
 | 
			
		||||
	- somewhat faster software texturing, fogging, depth testing
 | 
			
		||||
	- all color-index conformance tests now pass (only 8bpp tested)
 | 
			
		||||
	- SPARC assembly language TCL optimizations (David Miller)
 | 
			
		||||
	- GL_SGIS_generate_mipmap extension
 | 
			
		||||
    Bug Fixes:
 | 
			
		||||
	- fbiRev and tmuRev were unitialized when using Glide3
 | 
			
		||||
	- fixed a few color index mode conformance failures; all pass now
 | 
			
		||||
	- now appling antialiasing coverage to alpha after texturing
 | 
			
		||||
	- colors weren't getting clamped to [0,1] before color table lookup
 | 
			
		||||
	- fixed RISC alignment errors caused by COPY_4UBV macro
 | 
			
		||||
	- drawing wide, flat-shaded lines could cause a segfault
 | 
			
		||||
	- vertices now snapped to 1/16 pixel to fix rendering of tiny triangles
 | 
			
		||||
    Changes:
 | 
			
		||||
	- SGI's Sample Implementation (SI) 1.3 GLU library replaces Mesa GLU
 | 
			
		||||
	- new libOSMesa.so library, contains the OSMesa driver interface
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
4.0  October 22, 2001
 | 
			
		||||
    New:
 | 
			
		||||
	- Mesa 4.0 implements the OpenGL 1.3 specification
 | 
			
		||||
	- GL_IBM_rasterpos_clip extension
 | 
			
		||||
	- GL_EXT_texture_edge_clamp extension (aka GL_SGIS_texture_edge_clamp)
 | 
			
		||||
	- GL_ARB_texture_mirrored_repeat extension
 | 
			
		||||
	- WindML UGL driver (Stephane Raimbault)
 | 
			
		||||
	- added OSMESA_MAX_WIDTH/HEIGHT queries
 | 
			
		||||
	- attempted compiliation fixes for Solaris 5, 7 and 8
 | 
			
		||||
	- updated glext.h and glxext.h files
 | 
			
		||||
	- updated Windows driver (Karl Schultz)
 | 
			
		||||
    Bug fixes:
 | 
			
		||||
	- added some missing GLX 1.3 tokens to include/GL/glx.h
 | 
			
		||||
	- GL_COLOR_MATRIX changes weren't recognized by teximage functions
 | 
			
		||||
	- glCopyPixels with scale and bias was broken
 | 
			
		||||
	- glRasterPos with lighting could segfault
 | 
			
		||||
	- glDeleteTextures could leave a dangling pointer
 | 
			
		||||
	- Proxy textures for cube maps didn't work
 | 
			
		||||
	- fixed a number of 16-bit color channel bugs
 | 
			
		||||
	- fixed a few minor memory leaks
 | 
			
		||||
	- GLX context sharing was broken in 3.5
 | 
			
		||||
	- fixed state-update bugs in glPopClientAttrib()
 | 
			
		||||
	- fixed glDrawRangeElements() bug
 | 
			
		||||
	- fixed a glPush/PopAttrib() bug related to texture binding
 | 
			
		||||
	- flat-shaded, textured lines were broken
 | 
			
		||||
	- fixed a dangling pointer problem in the XMesa code (Chris Burghart)
 | 
			
		||||
	- lighting didn't always produce the correct alpha value
 | 
			
		||||
	- fixed 3DNow! code to not read past end of arrays (Andrew Lewycky)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
4.0.1  December 17, 2001
 | 
			
		||||
    New:
 | 
			
		||||
	- better sub-pixel sample positions for AA triangles (Ray Tice)
 | 
			
		||||
	- slightly faster blending for (GL_ZERO, GL_ONE) and (GL_ONE, GL_ZERO)
 | 
			
		||||
    Bug fixes:
 | 
			
		||||
	- added missing break statements in glGet*() for multisample cases
 | 
			
		||||
	- fixed uninitialized hash table mutex bug (display lists / texobjs)
 | 
			
		||||
	- fixed bad teximage error check conditional (bug 476846)
 | 
			
		||||
	- fixed demos readtex.c compilation problem on Windows (Karl Schultz)
 | 
			
		||||
	- added missing glGet() query for GL_MAX_TEXTURE_LOD_BIAS_EXT
 | 
			
		||||
	- silence some compiler warnings (gcc 2.96)
 | 
			
		||||
	- enable the #define GL_VERSION_1_3 in GL/gl.h
 | 
			
		||||
	- added GL 1.3 and GLX 1.4 entries to gl_mangle.h and glx_mangle.h
 | 
			
		||||
	- fixed glu.h typedef problem found with MSDev 6.0
 | 
			
		||||
	- build libGL.so with -Bsymbolic (fixes bug found with Chromium)
 | 
			
		||||
	- added missing 'const' to glXGetContextIDEXT() in glxext.h
 | 
			
		||||
	- fixed a few glXGetProcAddress() errors (texture compression, etc)
 | 
			
		||||
	- fixed start index bug in compiled vertex arrays (Keith)
 | 
			
		||||
	- fixed compilation problems in src/SPARC/glapi_sparc.S
 | 
			
		||||
	- fixed triangle strip "parity" bug found in VTK medical1 demo (Keith)
 | 
			
		||||
	- use glXGetProcAddressARB in GLUT to avoid extension linking problems
 | 
			
		||||
	- provoking vertex of flat-shaded, color-index triangles was wrong
 | 
			
		||||
	- fixed a few display list bugs (GLUT walker, molecule, etc) (Keith)
 | 
			
		||||
	- glTexParameter didn't flush the vertex buffer (Ray Tice)
 | 
			
		||||
	- feedback attributes for glDraw/CopyPixels and glBitmap were wrong
 | 
			
		||||
	- fixed bug in normal length caching (ParaView lighting bug)
 | 
			
		||||
	- fixed separate_specular color bug found in Chimera (18 Dec 2001)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
4.0.2  April 2, 2002
 | 
			
		||||
    New:
 | 
			
		||||
	- New DOS (DJGPP) driver written by Daniel Borca
 | 
			
		||||
	- New driver interface functions for TCL drivers (such as Radeon DRI)
 | 
			
		||||
	- GL_RENDERER string returns "Mesa Offscreen16" or "Mesa Offscreen32"
 | 
			
		||||
	  if using deep color channels
 | 
			
		||||
	- latest GL/glext.h and GL/glxext.h headers from SGI
 | 
			
		||||
    Bug fixes:
 | 
			
		||||
	- GL_BLEND with non-black texture env color wasn't always correct
 | 
			
		||||
	- GL_REPLACE with GL_RGB texture format wasn't always correct (alpha)
 | 
			
		||||
	- glTexEnviv( pname != GL_TEXTURE_ENV_COLOR ) was broken
 | 
			
		||||
	- glReadPixels was sometimes mistakenly clipped by the scissor box
 | 
			
		||||
	- glDraw/ReadPixels didn't catch all the errors that they should have
 | 
			
		||||
	- Fixed 24bpp rendering problem in Windows driver (Karl Schultz)
 | 
			
		||||
	- 16-bit GLchan mode fixes (m_trans_tmp.h, s_triangle.c)
 | 
			
		||||
	- Fixed 1-bit float->int conversion bug in glDrawPixels(GL_DEPTH_COMP)
 | 
			
		||||
	- glColorMask as sometimes effecting glXSwapBuffers()
 | 
			
		||||
	- fixed a potential bug in XMesaGarbageCollect()
 | 
			
		||||
	- N threads rendering into one window didn't work reliably
 | 
			
		||||
	- glCopyPixels didn't work for deep color channels
 | 
			
		||||
	- improved 8 -> 16bit/channel texture image conversion (Gerk Huisma)
 | 
			
		||||
	- glPopAttrib() didn't correctly restore user clip planes
 | 
			
		||||
	- user clip planes failed for some perspective projections (Chromium)
 | 
			
		||||
    Known bugs:
 | 
			
		||||
	- mipmap LOD computation
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
4.0.3  June 25, 2002
 | 
			
		||||
    New:
 | 
			
		||||
	- updated GL/glext.h file (version 15)
 | 
			
		||||
	- corrected MMX blend code (Jose Fonseca)
 | 
			
		||||
	- support for software-based alpha planes in Windows driver
 | 
			
		||||
	- updated GGI driver (Filip Spacek)
 | 
			
		||||
    Bug fixes:
 | 
			
		||||
	- glext.h had wrong values for GL_DOT3_RGB[A]_EXT tokens
 | 
			
		||||
	- OSMesaMakeCurrent() didn't recognize buffer size changes
 | 
			
		||||
	- assorted conformance fixes for 16-bit/channel rendering
 | 
			
		||||
	- texcombine alpha subtraction mode was broken
 | 
			
		||||
	- fixed lighting bug with non-uniform scaling and display lists
 | 
			
		||||
	- fixed bug when deleting shared display lists
 | 
			
		||||
	- disabled SPARC cliptest assembly code (Mesa bug 544665)
 | 
			
		||||
	- fixed a couple Solaris compilation/link problems
 | 
			
		||||
	- blending clipped glDrawPixels didn't always work
 | 
			
		||||
	- glGetTexImage() didn't accept packed pixel types
 | 
			
		||||
	- glPixelMapu[is]v() could explode given too large of pixelmap
 | 
			
		||||
	- glGetTexParameter[if]v() didn't accept GL_TEXTURE_MAX_ANISOTROPY_EXT
 | 
			
		||||
	- glXCopyContext() could lead to segfaults
 | 
			
		||||
	- glCullFace(GL_FRONT_AND_BACK) didn't work (bug 572665)
 | 
			
		||||
    Changes:
 | 
			
		||||
	- lots of C++ (g++) code clean-ups
 | 
			
		||||
	- lots of T&L updates for the Radeon DRI driver
 | 
			
		||||
    Known bugs:
 | 
			
		||||
	- mipmap LOD computation (fixed for Mesa 4.1)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
4.0.4  October 3, 2002
 | 
			
		||||
    New:
 | 
			
		||||
	- GL_NV_texture_rectangle extension
 | 
			
		||||
	- updated glext.h header (version 17)
 | 
			
		||||
	- updated DOS driver (Daniel Borca)
 | 
			
		||||
	- updated BeOS R5 driver (Philippe Houdoin)
 | 
			
		||||
	- added GL_IBM_texture_mirror_repeat
 | 
			
		||||
	- glxinfo now takes -l option to print interesting OpenGL limits info
 | 
			
		||||
	- GL_MESA_ycbcr_texture extension
 | 
			
		||||
	- GL_APPLE_client_storage extension (for some DRI drivers only)
 | 
			
		||||
	- GL_MESA_pack_invert extension
 | 
			
		||||
    Bug fixes:
 | 
			
		||||
	- fixed GL_LINEAR fog bug by adding clamping
 | 
			
		||||
	- fixed FP exceptions found using Alpha CPU
 | 
			
		||||
	- 3dfx MESA_GLX_FX=window (render to window) didn't work
 | 
			
		||||
	- fixed memory leak in wglCreateContest (Karl Schultz)
 | 
			
		||||
	- define GLAPIENTRY and GLAPI if undefined in glu.h
 | 
			
		||||
	- wglGetProcAddress didn't handle all API functions
 | 
			
		||||
	- when testing for OpenGL 1.2 vs 1.3, check for GL_ARB_texture_cube_map
 | 
			
		||||
	- removed GL_MAX_CONVOLUTION_WIDTH/HEIGHT from glGetInteger/Float/etc()
 | 
			
		||||
	- error checking in compressed tex image functions had some glitches
 | 
			
		||||
	- fixed AIX compile problem in src/config.c
 | 
			
		||||
	- glGetTexImage was using pixel unpacking instead of packing params
 | 
			
		||||
	- auto-mipmap generation for cube maps was incorrect
 | 
			
		||||
    Changes:
 | 
			
		||||
	- max texture units reduced to six to accomodate texture rectangles
 | 
			
		||||
	- removed unfinished GL_MESA_sprite_point extension code
 | 
			
		||||
 
 | 
			
		||||
@@ -2,33 +2,42 @@
 | 
			
		||||
 | 
			
		||||
GLincludedir = $(includedir)/GL
 | 
			
		||||
 | 
			
		||||
if HAVE_FX
 | 
			
		||||
INC_FX = fxmesa.h
 | 
			
		||||
INC_GGI = ggimesa.h
 | 
			
		||||
INC_OSMESA = osmesa.h
 | 
			
		||||
INC_SVGA = svgamesa.h
 | 
			
		||||
INC_X11 = glx.h glxext.h glx_mangle.h xmesa.h xmesa_x.h xmesa_xf86.h
 | 
			
		||||
INC_GLUT = glut.h glutf90.h
 | 
			
		||||
 | 
			
		||||
if HAVE_FX
 | 
			
		||||
sel_inc_fx = $(INC_FX)
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
if HAVE_GGI
 | 
			
		||||
INC_GGI = ggimesa.h
 | 
			
		||||
sel_inc_ggi = $(INC_GGI)
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
if HAVE_OSMESA
 | 
			
		||||
INC_OSMESA = osmesa.h
 | 
			
		||||
sel_inc_osmesa = $(INC_OSMESA)
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
if HAVE_SVGA
 | 
			
		||||
INC_SVGA = svgamesa.h
 | 
			
		||||
sel_inc_svga = $(INC_SVGA)
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
if HAVE_X11
 | 
			
		||||
INC_X11 = glx.h glx_mangle.h xmesa.h xmesa_x.h xmesa_xf86.h
 | 
			
		||||
sel_inc_x11 = $(INC_X11)
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
if NEED_GLUT
 | 
			
		||||
INC_GLUT = glut.h
 | 
			
		||||
sel_inc_glut = $(INC_GLUT)
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
EXTRA_DIST = fxmesa.h ggimesa.h osmesa.h svgamesa.h \
 | 
			
		||||
	glx.h glx_mangle.h xmesa.h xmesa_x.h xmesa_xf86.h
 | 
			
		||||
 | 
			
		||||
GLinclude_HEADERS = gl.h gl_mangle.h glu.h glu_mangle.h \
 | 
			
		||||
EXTRA_HEADERS = amesa.h dosmesa.h foomesa.h glut_h.dja mesa_wgl.h mglmesa.h \
 | 
			
		||||
	vms_x_fix.h wmesa.h \
 | 
			
		||||
	$(INC_FX) $(INC_GGI) $(INC_OSMESA) $(INC_SVGA) $(INC_X11) $(INC_GLUT)
 | 
			
		||||
 | 
			
		||||
GLinclude_HEADERS = gl.h glext.h gl_mangle.h glu.h glu_mangle.h \
 | 
			
		||||
	$(sel_inc_fx) $(sel_inc_ggi) $(sel_inc_osmesa) $(sel_inc_svga) \
 | 
			
		||||
	$(sel_inc_x11) $(sel_inc_glut)
 | 
			
		||||
include $(top_srcdir)/common_rules.make
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
/* $Id: amesa.h,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
 | 
			
		||||
/* $Id: amesa.h,v 1.2 2000/02/09 19:03:28 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.1
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (C) 1999  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * Copyright (C) 1999-2000  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * 
 | 
			
		||||
 * Permission is hereby granted, free of charge, to any person obtaining a
 | 
			
		||||
 * copy of this software and associated documentation files (the "Software"),
 | 
			
		||||
@@ -25,25 +25,17 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: amesa.h,v $
 | 
			
		||||
 * Revision 1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Initial revision
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.1  1999/03/16 01:24:13  brianp
 | 
			
		||||
 * initial check-in
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Allegro (DJGPP) driver by Bernhard Tschirren (bernie-t@geocities.com) */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifndef AMESA_H
 | 
			
		||||
#define AMESA_H
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define AMESA_MAJOR_VERSION 3
 | 
			
		||||
#define AMESA_MINOR_VERSION 3
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct amesa_visual  *AMesaVisual;
 | 
			
		||||
typedef struct amesa_buffer  *AMesaBuffer;
 | 
			
		||||
typedef struct amesa_context *AMesaContext;
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										77
									
								
								include/GL/dmesa.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										77
									
								
								include/GL/dmesa.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,77 @@
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  4.0
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (C) 1999  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * 
 | 
			
		||||
 * Permission is hereby granted, free of charge, to any person obtaining a
 | 
			
		||||
 * copy of this software and associated documentation files (the "Software"),
 | 
			
		||||
 * to deal in the Software without restriction, including without limitation
 | 
			
		||||
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 | 
			
		||||
 * and/or sell copies of the Software, and to permit persons to whom the
 | 
			
		||||
 * Software is furnished to do so, subject to the following conditions:
 | 
			
		||||
 * 
 | 
			
		||||
 * The above copyright notice and this permission notice shall be included
 | 
			
		||||
 * in all copies or substantial portions of the Software.
 | 
			
		||||
 * 
 | 
			
		||||
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 | 
			
		||||
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
			
		||||
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 | 
			
		||||
 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
 | 
			
		||||
 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 | 
			
		||||
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * DOS/DJGPP device driver v1.0 for Mesa 4.0
 | 
			
		||||
 *
 | 
			
		||||
 *  Copyright (C) 2002 - Borca Daniel
 | 
			
		||||
 *  Email : dborca@yahoo.com
 | 
			
		||||
 *  Web   : http://www.geocities.com/dborca
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifndef DMESA_included
 | 
			
		||||
#define DMESA_included
 | 
			
		||||
 | 
			
		||||
#define DMESA_MAJOR_VERSION 4
 | 
			
		||||
#define DMESA_MINOR_VERSION 0
 | 
			
		||||
 | 
			
		||||
typedef struct dmesa_context *DMesaContext;
 | 
			
		||||
typedef struct dmesa_visual *DMesaVisual;
 | 
			
		||||
typedef struct dmesa_buffer *DMesaBuffer;
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
DMesaVisual DMesaCreateVisual (GLint width, GLint height, GLint colDepth,
 | 
			
		||||
                               GLboolean dbFlag, GLint depthSize,
 | 
			
		||||
                               GLint stencilSize,
 | 
			
		||||
                               GLint accumSize);
 | 
			
		||||
 | 
			
		||||
void DMesaDestroyVisual (DMesaVisual v);
 | 
			
		||||
 | 
			
		||||
DMesaBuffer DMesaCreateBuffer (DMesaVisual visual,
 | 
			
		||||
                               GLint xpos, GLint ypos,
 | 
			
		||||
                               GLint width, GLint height);
 | 
			
		||||
 | 
			
		||||
void DMesaDestroyBuffer (DMesaBuffer b);
 | 
			
		||||
 | 
			
		||||
DMesaContext DMesaCreateContext (DMesaVisual visual, DMesaContext share);
 | 
			
		||||
 | 
			
		||||
void DMesaDestroyContext (DMesaContext c);
 | 
			
		||||
 | 
			
		||||
GLboolean DMesaViewport (DMesaBuffer b,
 | 
			
		||||
                         GLint xpos, GLint ypos,
 | 
			
		||||
                         GLint width, GLint height);
 | 
			
		||||
 | 
			
		||||
GLboolean DMesaMakeCurrent (DMesaContext c, DMesaBuffer b);
 | 
			
		||||
 | 
			
		||||
void DMesaSwapBuffers (DMesaBuffer b);
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
@@ -1,9 +1,9 @@
 | 
			
		||||
/* $Id: fxmesa.h,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
 | 
			
		||||
/* $Id: fxmesa.h,v 1.4 2001/09/23 16:06:13 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.1
 | 
			
		||||
 * Copyright (C) 1995-1999  Brian Paul
 | 
			
		||||
 * Version:  4.0
 | 
			
		||||
 * Copyright (C) 1995-2001  Brian Paul
 | 
			
		||||
 *
 | 
			
		||||
 * This library is free software; you can redistribute it and/or
 | 
			
		||||
 * modify it under the terms of the GNU Library General Public
 | 
			
		||||
@@ -21,23 +21,6 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: fxmesa.h,v $
 | 
			
		||||
 * Revision 1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Initial revision
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.2  1999/01/03 02:46:31  brianp
 | 
			
		||||
 * now using GLAPI and GLAPIENTRY keywords (Ted Jump)
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.1  1998/04/01 03:00:28  brianp
 | 
			
		||||
 * updated for v0.24 of 3Dfx/Glide driver
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.0  1998/02/20 05:04:45  brianp
 | 
			
		||||
 * initial rev
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * FXMesa - 3Dfx Glide driver for Mesa.  Contributed by David Bucciarelli
 | 
			
		||||
 *
 | 
			
		||||
@@ -57,7 +40,7 @@ extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define FXMESA_MAJOR_VERSION 3
 | 
			
		||||
#define FXMESA_MAJOR_VERSION 4
 | 
			
		||||
#define FXMESA_MINOR_VERSION 0
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,11 @@
 | 
			
		||||
/* $Id: ggimesa.h,v 1.2 1999/08/23 22:34:08 jtaylor Exp $ */
 | 
			
		||||
/* $Id: ggimesa.h,v 1.3.6.1 2002/06/10 15:16:16 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.1
 | 
			
		||||
 * Copyright (C) 1995-1998  Brian Paul
 | 
			
		||||
 * Mesa 3-D graphics library GGI bindings (GGIGL [giggle])
 | 
			
		||||
 * Version:  4.0
 | 
			
		||||
 * Copyright (C) 1995-2000  Brian Paul
 | 
			
		||||
 * Copyright (C) 1998  Uwe Maurer
 | 
			
		||||
 * Copyrigth (C) 2001 Filip Spacek
 | 
			
		||||
 *
 | 
			
		||||
 * This library is free software; you can redistribute it and/or
 | 
			
		||||
 * modify it under the terms of the GNU Library General Public
 | 
			
		||||
@@ -22,46 +23,62 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: ggimesa.h,v $
 | 
			
		||||
 * Revision 1.2  1999/08/23 22:34:08  jtaylor
 | 
			
		||||
 * Misc small cleanups
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.1.1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Imported sources
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.2  1998/09/29 01:46:40  brianp
 | 
			
		||||
 * applied Emmanuel Marty's patches for latest GGI
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifndef GGIMESA_H
 | 
			
		||||
#define GGIMESA_H
 | 
			
		||||
 | 
			
		||||
#define GGIMESA_MAJOR_VERSION 4
 | 
			
		||||
#define GGIMESA_MINOR_VERSION 0
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include "GL/gl.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct ggi_mesa_context *GGIMesaContext;
 | 
			
		||||
 | 
			
		||||
#include <ggi/ggi.h>
 | 
			
		||||
#include "GL/gl.h"
 | 
			
		||||
  
 | 
			
		||||
typedef struct ggi_mesa_context *ggi_mesa_context_t;
 | 
			
		||||
 | 
			
		||||
extern GGIMesaContext GGIMesaCreateContext(void);
 | 
			
		||||
/*
 | 
			
		||||
 * Initialize Mesa GGI extension
 | 
			
		||||
 */
 | 
			
		||||
int ggiMesaInit(void);
 | 
			
		||||
/*
 | 
			
		||||
 * Clean up Mesa GGI exension
 | 
			
		||||
 */
 | 
			
		||||
int ggiMesaExit(void);
 | 
			
		||||
 | 
			
		||||
extern void GGIMesaDestroyContext(GGIMesaContext ctx);
 | 
			
		||||
/*
 | 
			
		||||
 * Attach Mesa GGI extension to the visual 'vis'
 | 
			
		||||
 */
 | 
			
		||||
int ggiMesaAttach(ggi_visual_t vis);
 | 
			
		||||
/*
 | 
			
		||||
 * Detach Mesa GGI extension from the visual 'vis'
 | 
			
		||||
 */
 | 
			
		||||
int ggiMesaDetach(ggi_visual_t vis);
 | 
			
		||||
 | 
			
		||||
extern void GGIMesaMakeCurrent(GGIMesaContext ctx);
 | 
			
		||||
int ggiMesaExtendVisual(ggi_visual_t vis, GLboolean alpha_flag,
 | 
			
		||||
			GLboolean stereo_flag, GLint depth_size,
 | 
			
		||||
			GLint stencil_size, GLint accum_red_size,
 | 
			
		||||
			GLint accum_green_size, GLint accum_blue_size,
 | 
			
		||||
			GLint accum_alpha_size, GLint num_samples);
 | 
			
		||||
 | 
			
		||||
extern GGIMesaContext GGIMesaGetCurrentContext(void);
 | 
			
		||||
/*
 | 
			
		||||
 * Create a new context capable of displaying on the visual vis.
 | 
			
		||||
 */
 | 
			
		||||
ggi_mesa_context_t ggiMesaCreateContext(ggi_visual_t vis);
 | 
			
		||||
/*
 | 
			
		||||
 * Destroy the context 'ctx'
 | 
			
		||||
 */
 | 
			
		||||
void ggiMesaDestroyContext(ggi_mesa_context_t ctx);
 | 
			
		||||
 | 
			
		||||
extern void GGIMesaSwapBuffers(void);
 | 
			
		||||
/*
 | 
			
		||||
 * Make context 'ctx' the current context and bind it to visual 'vis'.
 | 
			
		||||
 * Note that the context must have been created with respect to that visual.
 | 
			
		||||
 */
 | 
			
		||||
void ggiMesaMakeCurrent(ggi_mesa_context_t ctx, ggi_visual_t vis);
 | 
			
		||||
 | 
			
		||||
void ggiMesaSwapBuffers(void);
 | 
			
		||||
 | 
			
		||||
extern int GGIMesaSetVisual(GGIMesaContext ctx, ggi_visual_t vis,
 | 
			
		||||
			    GLboolean rgb_flag, GLboolean db_flag);
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1785
									
								
								include/GL/gl.h
									
									
									
									
									
								
							
							
						
						
									
										1785
									
								
								include/GL/gl.h
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										5024
									
								
								include/GL/glext.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5024
									
								
								include/GL/glext.h
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										771
									
								
								include/GL/glu.h
									
									
									
									
									
								
							
							
						
						
									
										771
									
								
								include/GL/glu.h
									
									
									
									
									
								
							@@ -1,486 +1,335 @@
 | 
			
		||||
/* $Id: glu.h,v 1.16 1999/11/11 03:21:43 kendallb Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 *
 | 
			
		||||
 * Copyright (C) 1995-1999  Brian Paul
 | 
			
		||||
 *
 | 
			
		||||
 * This library is free software; you can redistribute it and/or
 | 
			
		||||
 * modify it under the terms of the GNU Library General Public
 | 
			
		||||
 * License as published by the Free Software Foundation; either
 | 
			
		||||
 * version 2 of the License, or (at your option) any later version.
 | 
			
		||||
 *
 | 
			
		||||
 * This library is distributed in the hope that it will be useful,
 | 
			
		||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 | 
			
		||||
 * Library General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU Library General Public
 | 
			
		||||
 * License along with this library; if not, write to the Free
 | 
			
		||||
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifndef GLU_H
 | 
			
		||||
#define GLU_H
 | 
			
		||||
** License Applicability. Except to the extent portions of this file are
 | 
			
		||||
** made subject to an alternative license as permitted in the SGI Free
 | 
			
		||||
** Software License B, Version 1.1 (the "License"), the contents of this
 | 
			
		||||
** file are subject only to the provisions of the License. You may not use
 | 
			
		||||
** this file except in compliance with the License. You may obtain a copy
 | 
			
		||||
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
 | 
			
		||||
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
 | 
			
		||||
** 
 | 
			
		||||
** http://oss.sgi.com/projects/FreeB
 | 
			
		||||
** 
 | 
			
		||||
** Note that, as provided in the License, the Software is distributed on an
 | 
			
		||||
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
 | 
			
		||||
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
 | 
			
		||||
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
 | 
			
		||||
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
 | 
			
		||||
** 
 | 
			
		||||
** Original Code. The Original Code is: OpenGL Sample Implementation,
 | 
			
		||||
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
 | 
			
		||||
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
 | 
			
		||||
** Copyright in any portions created by third parties is as indicated
 | 
			
		||||
** elsewhere herein. All Rights Reserved.
 | 
			
		||||
** 
 | 
			
		||||
** Additional Notice Provisions: This software was created using the
 | 
			
		||||
** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
 | 
			
		||||
** not been independently verified as being compliant with the OpenGL(R)
 | 
			
		||||
** version 1.2.1 Specification.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef __glu_h__
 | 
			
		||||
#define __glu_h__
 | 
			
		||||
 | 
			
		||||
#if defined(USE_MGL_NAMESPACE)
 | 
			
		||||
#include "glu_mangle.h"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include "GL/gl.h"
 | 
			
		||||
 | 
			
		||||
	/* to facilitate clean DLL building ... */
 | 
			
		||||
#if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN32__))
 | 
			
		||||
#	if defined(_MSC_VER) && defined(BUILD_GLU32) /* tag specify we're building mesa as a DLL */
 | 
			
		||||
#		define GLUAPI __declspec(dllexport)
 | 
			
		||||
#	elif defined(_MSC_VER) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
 | 
			
		||||
#		define GLUAPI __declspec(dllimport)
 | 
			
		||||
#	else /* for use with static link lib build of Win32 edition only */
 | 
			
		||||
#		define GLUAPI extern
 | 
			
		||||
#	endif /* _STATIC_MESA support */
 | 
			
		||||
#else
 | 
			
		||||
#	define GLUAPI extern
 | 
			
		||||
#endif /* WIN32 / CYGWIN32 bracket */
 | 
			
		||||
 | 
			
		||||
#ifdef macintosh
 | 
			
		||||
	#pragma enumsalwaysint on
 | 
			
		||||
	#if PRAGMA_IMPORT_SUPPORTED
 | 
			
		||||
	#pragma import on
 | 
			
		||||
	#endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLUAPI
 | 
			
		||||
#define GLUAPI
 | 
			
		||||
#endif
 | 
			
		||||
#include <GL/gl.h>
 | 
			
		||||
 | 
			
		||||
#ifndef GLAPIENTRY
 | 
			
		||||
#define GLAPIENTRY
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLCALLBACK
 | 
			
		||||
#define GLCALLBACK
 | 
			
		||||
#ifndef GLAPI
 | 
			
		||||
#define GLAPI
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define GLU_VERSION_1_1			1
 | 
			
		||||
#define GLU_VERSION_1_2			1
 | 
			
		||||
/*************************************************************/
 | 
			
		||||
 | 
			
		||||
/* Extensions */
 | 
			
		||||
#define GLU_EXT_object_space_tess          1
 | 
			
		||||
#define GLU_EXT_nurbs_tessellator          1
 | 
			
		||||
 | 
			
		||||
/* Boolean */
 | 
			
		||||
#define GLU_FALSE                          0
 | 
			
		||||
#define GLU_TRUE                           1
 | 
			
		||||
 | 
			
		||||
/* Version */
 | 
			
		||||
#define GLU_VERSION_1_1                    1
 | 
			
		||||
#define GLU_VERSION_1_2                    1
 | 
			
		||||
#define GLU_VERSION_1_3                    1
 | 
			
		||||
 | 
			
		||||
/* StringName */
 | 
			
		||||
#define GLU_VERSION                        100800
 | 
			
		||||
#define GLU_EXTENSIONS                     100801
 | 
			
		||||
 | 
			
		||||
/* ErrorCode */
 | 
			
		||||
#define GLU_INVALID_ENUM                   100900
 | 
			
		||||
#define GLU_INVALID_VALUE                  100901
 | 
			
		||||
#define GLU_OUT_OF_MEMORY                  100902
 | 
			
		||||
#define GLU_INVALID_OPERATION              100904
 | 
			
		||||
 | 
			
		||||
/* NurbsDisplay */
 | 
			
		||||
/*      GLU_FILL */
 | 
			
		||||
#define GLU_OUTLINE_POLYGON                100240
 | 
			
		||||
#define GLU_OUTLINE_PATCH                  100241
 | 
			
		||||
 | 
			
		||||
/* NurbsCallback */
 | 
			
		||||
#define GLU_NURBS_ERROR                    100103
 | 
			
		||||
#define GLU_ERROR                          100103
 | 
			
		||||
#define GLU_NURBS_BEGIN                    100164
 | 
			
		||||
#define GLU_NURBS_BEGIN_EXT                100164
 | 
			
		||||
#define GLU_NURBS_VERTEX                   100165
 | 
			
		||||
#define GLU_NURBS_VERTEX_EXT               100165
 | 
			
		||||
#define GLU_NURBS_NORMAL                   100166
 | 
			
		||||
#define GLU_NURBS_NORMAL_EXT               100166
 | 
			
		||||
#define GLU_NURBS_COLOR                    100167
 | 
			
		||||
#define GLU_NURBS_COLOR_EXT                100167
 | 
			
		||||
#define GLU_NURBS_TEXTURE_COORD            100168
 | 
			
		||||
#define GLU_NURBS_TEX_COORD_EXT            100168
 | 
			
		||||
#define GLU_NURBS_END                      100169
 | 
			
		||||
#define GLU_NURBS_END_EXT                  100169
 | 
			
		||||
#define GLU_NURBS_BEGIN_DATA               100170
 | 
			
		||||
#define GLU_NURBS_BEGIN_DATA_EXT           100170
 | 
			
		||||
#define GLU_NURBS_VERTEX_DATA              100171
 | 
			
		||||
#define GLU_NURBS_VERTEX_DATA_EXT          100171
 | 
			
		||||
#define GLU_NURBS_NORMAL_DATA              100172
 | 
			
		||||
#define GLU_NURBS_NORMAL_DATA_EXT          100172
 | 
			
		||||
#define GLU_NURBS_COLOR_DATA               100173
 | 
			
		||||
#define GLU_NURBS_COLOR_DATA_EXT           100173
 | 
			
		||||
#define GLU_NURBS_TEXTURE_COORD_DATA       100174
 | 
			
		||||
#define GLU_NURBS_TEX_COORD_DATA_EXT       100174
 | 
			
		||||
#define GLU_NURBS_END_DATA                 100175
 | 
			
		||||
#define GLU_NURBS_END_DATA_EXT             100175
 | 
			
		||||
 | 
			
		||||
/* NurbsError */
 | 
			
		||||
#define GLU_NURBS_ERROR1                   100251
 | 
			
		||||
#define GLU_NURBS_ERROR2                   100252
 | 
			
		||||
#define GLU_NURBS_ERROR3                   100253
 | 
			
		||||
#define GLU_NURBS_ERROR4                   100254
 | 
			
		||||
#define GLU_NURBS_ERROR5                   100255
 | 
			
		||||
#define GLU_NURBS_ERROR6                   100256
 | 
			
		||||
#define GLU_NURBS_ERROR7                   100257
 | 
			
		||||
#define GLU_NURBS_ERROR8                   100258
 | 
			
		||||
#define GLU_NURBS_ERROR9                   100259
 | 
			
		||||
#define GLU_NURBS_ERROR10                  100260
 | 
			
		||||
#define GLU_NURBS_ERROR11                  100261
 | 
			
		||||
#define GLU_NURBS_ERROR12                  100262
 | 
			
		||||
#define GLU_NURBS_ERROR13                  100263
 | 
			
		||||
#define GLU_NURBS_ERROR14                  100264
 | 
			
		||||
#define GLU_NURBS_ERROR15                  100265
 | 
			
		||||
#define GLU_NURBS_ERROR16                  100266
 | 
			
		||||
#define GLU_NURBS_ERROR17                  100267
 | 
			
		||||
#define GLU_NURBS_ERROR18                  100268
 | 
			
		||||
#define GLU_NURBS_ERROR19                  100269
 | 
			
		||||
#define GLU_NURBS_ERROR20                  100270
 | 
			
		||||
#define GLU_NURBS_ERROR21                  100271
 | 
			
		||||
#define GLU_NURBS_ERROR22                  100272
 | 
			
		||||
#define GLU_NURBS_ERROR23                  100273
 | 
			
		||||
#define GLU_NURBS_ERROR24                  100274
 | 
			
		||||
#define GLU_NURBS_ERROR25                  100275
 | 
			
		||||
#define GLU_NURBS_ERROR26                  100276
 | 
			
		||||
#define GLU_NURBS_ERROR27                  100277
 | 
			
		||||
#define GLU_NURBS_ERROR28                  100278
 | 
			
		||||
#define GLU_NURBS_ERROR29                  100279
 | 
			
		||||
#define GLU_NURBS_ERROR30                  100280
 | 
			
		||||
#define GLU_NURBS_ERROR31                  100281
 | 
			
		||||
#define GLU_NURBS_ERROR32                  100282
 | 
			
		||||
#define GLU_NURBS_ERROR33                  100283
 | 
			
		||||
#define GLU_NURBS_ERROR34                  100284
 | 
			
		||||
#define GLU_NURBS_ERROR35                  100285
 | 
			
		||||
#define GLU_NURBS_ERROR36                  100286
 | 
			
		||||
#define GLU_NURBS_ERROR37                  100287
 | 
			
		||||
 | 
			
		||||
/* NurbsProperty */
 | 
			
		||||
#define GLU_AUTO_LOAD_MATRIX               100200
 | 
			
		||||
#define GLU_CULLING                        100201
 | 
			
		||||
#define GLU_SAMPLING_TOLERANCE             100203
 | 
			
		||||
#define GLU_DISPLAY_MODE                   100204
 | 
			
		||||
#define GLU_PARAMETRIC_TOLERANCE           100202
 | 
			
		||||
#define GLU_SAMPLING_METHOD                100205
 | 
			
		||||
#define GLU_U_STEP                         100206
 | 
			
		||||
#define GLU_V_STEP                         100207
 | 
			
		||||
#define GLU_NURBS_MODE                     100160
 | 
			
		||||
#define GLU_NURBS_MODE_EXT                 100160
 | 
			
		||||
#define GLU_NURBS_TESSELLATOR              100161
 | 
			
		||||
#define GLU_NURBS_TESSELLATOR_EXT          100161
 | 
			
		||||
#define GLU_NURBS_RENDERER                 100162
 | 
			
		||||
#define GLU_NURBS_RENDERER_EXT             100162
 | 
			
		||||
 | 
			
		||||
/* NurbsSampling */
 | 
			
		||||
#define GLU_OBJECT_PARAMETRIC_ERROR        100208
 | 
			
		||||
#define GLU_OBJECT_PARAMETRIC_ERROR_EXT    100208
 | 
			
		||||
#define GLU_OBJECT_PATH_LENGTH             100209
 | 
			
		||||
#define GLU_OBJECT_PATH_LENGTH_EXT         100209
 | 
			
		||||
#define GLU_PATH_LENGTH                    100215
 | 
			
		||||
#define GLU_PARAMETRIC_ERROR               100216
 | 
			
		||||
#define GLU_DOMAIN_DISTANCE                100217
 | 
			
		||||
 | 
			
		||||
/* NurbsTrim */
 | 
			
		||||
#define GLU_MAP1_TRIM_2                    100210
 | 
			
		||||
#define GLU_MAP1_TRIM_3                    100211
 | 
			
		||||
 | 
			
		||||
/* QuadricDrawStyle */
 | 
			
		||||
#define GLU_POINT                          100010
 | 
			
		||||
#define GLU_LINE                           100011
 | 
			
		||||
#define GLU_FILL                           100012
 | 
			
		||||
#define GLU_SILHOUETTE                     100013
 | 
			
		||||
 | 
			
		||||
/* QuadricCallback */
 | 
			
		||||
/*      GLU_ERROR */
 | 
			
		||||
 | 
			
		||||
/* QuadricNormal */
 | 
			
		||||
#define GLU_SMOOTH                         100000
 | 
			
		||||
#define GLU_FLAT                           100001
 | 
			
		||||
#define GLU_NONE                           100002
 | 
			
		||||
 | 
			
		||||
/* QuadricOrientation */
 | 
			
		||||
#define GLU_OUTSIDE                        100020
 | 
			
		||||
#define GLU_INSIDE                         100021
 | 
			
		||||
 | 
			
		||||
/* TessCallback */
 | 
			
		||||
#define GLU_TESS_BEGIN                     100100
 | 
			
		||||
#define GLU_BEGIN                          100100
 | 
			
		||||
#define GLU_TESS_VERTEX                    100101
 | 
			
		||||
#define GLU_VERTEX                         100101
 | 
			
		||||
#define GLU_TESS_END                       100102
 | 
			
		||||
#define GLU_END                            100102
 | 
			
		||||
#define GLU_TESS_ERROR                     100103
 | 
			
		||||
#define GLU_TESS_EDGE_FLAG                 100104
 | 
			
		||||
#define GLU_EDGE_FLAG                      100104
 | 
			
		||||
#define GLU_TESS_COMBINE                   100105
 | 
			
		||||
#define GLU_TESS_BEGIN_DATA                100106
 | 
			
		||||
#define GLU_TESS_VERTEX_DATA               100107
 | 
			
		||||
#define GLU_TESS_END_DATA                  100108
 | 
			
		||||
#define GLU_TESS_ERROR_DATA                100109
 | 
			
		||||
#define GLU_TESS_EDGE_FLAG_DATA            100110
 | 
			
		||||
#define GLU_TESS_COMBINE_DATA              100111
 | 
			
		||||
 | 
			
		||||
/* TessContour */
 | 
			
		||||
#define GLU_CW                             100120
 | 
			
		||||
#define GLU_CCW                            100121
 | 
			
		||||
#define GLU_INTERIOR                       100122
 | 
			
		||||
#define GLU_EXTERIOR                       100123
 | 
			
		||||
#define GLU_UNKNOWN                        100124
 | 
			
		||||
 | 
			
		||||
/* TessProperty */
 | 
			
		||||
#define GLU_TESS_WINDING_RULE              100140
 | 
			
		||||
#define GLU_TESS_BOUNDARY_ONLY             100141
 | 
			
		||||
#define GLU_TESS_TOLERANCE                 100142
 | 
			
		||||
 | 
			
		||||
/* TessError */
 | 
			
		||||
#define GLU_TESS_ERROR1                    100151
 | 
			
		||||
#define GLU_TESS_ERROR2                    100152
 | 
			
		||||
#define GLU_TESS_ERROR3                    100153
 | 
			
		||||
#define GLU_TESS_ERROR4                    100154
 | 
			
		||||
#define GLU_TESS_ERROR5                    100155
 | 
			
		||||
#define GLU_TESS_ERROR6                    100156
 | 
			
		||||
#define GLU_TESS_ERROR7                    100157
 | 
			
		||||
#define GLU_TESS_ERROR8                    100158
 | 
			
		||||
#define GLU_TESS_MISSING_BEGIN_POLYGON     100151
 | 
			
		||||
#define GLU_TESS_MISSING_BEGIN_CONTOUR     100152
 | 
			
		||||
#define GLU_TESS_MISSING_END_POLYGON       100153
 | 
			
		||||
#define GLU_TESS_MISSING_END_CONTOUR       100154
 | 
			
		||||
#define GLU_TESS_COORD_TOO_LARGE           100155
 | 
			
		||||
#define GLU_TESS_NEED_COMBINE_CALLBACK     100156
 | 
			
		||||
 | 
			
		||||
/* TessWinding */
 | 
			
		||||
#define GLU_TESS_WINDING_ODD               100130
 | 
			
		||||
#define GLU_TESS_WINDING_NONZERO           100131
 | 
			
		||||
#define GLU_TESS_WINDING_POSITIVE          100132
 | 
			
		||||
#define GLU_TESS_WINDING_NEGATIVE          100133
 | 
			
		||||
#define GLU_TESS_WINDING_ABS_GEQ_TWO       100134
 | 
			
		||||
 | 
			
		||||
/*************************************************************/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define GLU_TRUE			1
 | 
			
		||||
#define GLU_FALSE			0
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Normal vectors */
 | 
			
		||||
#define GLU_SMOOTH			100000
 | 
			
		||||
#define GLU_FLAT			100001
 | 
			
		||||
#define GLU_NONE			100002
 | 
			
		||||
 | 
			
		||||
/* Quadric draw styles */
 | 
			
		||||
#define GLU_POINT			100010
 | 
			
		||||
#define GLU_LINE			100011
 | 
			
		||||
#define GLU_FILL			100012
 | 
			
		||||
#define GLU_SILHOUETTE			100013
 | 
			
		||||
 | 
			
		||||
/* Quadric orientation */
 | 
			
		||||
#define GLU_OUTSIDE			100020
 | 
			
		||||
#define GLU_INSIDE			100021
 | 
			
		||||
 | 
			
		||||
/* Tessellator */
 | 
			
		||||
#define GLU_TESS_BEGIN			100100
 | 
			
		||||
#define GLU_TESS_VERTEX			100101
 | 
			
		||||
#define GLU_TESS_END			100102
 | 
			
		||||
#define GLU_TESS_ERROR			100103
 | 
			
		||||
#define GLU_TESS_EDGE_FLAG		100104
 | 
			
		||||
#define GLU_TESS_COMBINE		100105
 | 
			
		||||
 | 
			
		||||
#define GLU_TESS_BEGIN_DATA		100106
 | 
			
		||||
#define GLU_TESS_VERTEX_DATA		100107
 | 
			
		||||
#define GLU_TESS_END_DATA		100108
 | 
			
		||||
#define GLU_TESS_ERROR_DATA		100109
 | 
			
		||||
#define GLU_TESS_EDGE_FLAG_DATA		100110
 | 
			
		||||
#define GLU_TESS_COMBINE_DATA		100111
 | 
			
		||||
 | 
			
		||||
/* Winding rules */
 | 
			
		||||
#define GLU_TESS_WINDING_ODD		100130
 | 
			
		||||
#define GLU_TESS_WINDING_NONZERO	100131
 | 
			
		||||
#define GLU_TESS_WINDING_POSITIVE	100132
 | 
			
		||||
#define GLU_TESS_WINDING_NEGATIVE	100133
 | 
			
		||||
#define GLU_TESS_WINDING_ABS_GEQ_TWO	100134
 | 
			
		||||
 | 
			
		||||
/* Tessellation properties */
 | 
			
		||||
#define GLU_TESS_WINDING_RULE		100140
 | 
			
		||||
#define GLU_TESS_BOUNDARY_ONLY		100141
 | 
			
		||||
#define GLU_TESS_TOLERANCE		100142
 | 
			
		||||
 | 
			
		||||
/* Tessellation errors */
 | 
			
		||||
#define GLU_TESS_ERROR1			100151  /* Missing gluBeginPolygon */
 | 
			
		||||
#define GLU_TESS_ERROR2			100152  /* Missing gluBeginContour */
 | 
			
		||||
#define GLU_TESS_ERROR3			100153  /* Missing gluEndPolygon */
 | 
			
		||||
#define GLU_TESS_ERROR4			100154  /* Missing gluEndContour */
 | 
			
		||||
#define GLU_TESS_ERROR5			100155  /* */
 | 
			
		||||
#define GLU_TESS_ERROR6			100156  /* */
 | 
			
		||||
#define GLU_TESS_ERROR7			100157  /* */
 | 
			
		||||
#define GLU_TESS_ERROR8			100158  /* */
 | 
			
		||||
 | 
			
		||||
/* NURBS */
 | 
			
		||||
#define GLU_AUTO_LOAD_MATRIX		100200
 | 
			
		||||
#define GLU_CULLING			100201
 | 
			
		||||
#define GLU_PARAMETRIC_TOLERANCE	100202
 | 
			
		||||
#define GLU_SAMPLING_TOLERANCE		100203
 | 
			
		||||
#define GLU_DISPLAY_MODE		100204
 | 
			
		||||
#define GLU_SAMPLING_METHOD		100205
 | 
			
		||||
#define GLU_U_STEP			100206
 | 
			
		||||
#define GLU_V_STEP			100207
 | 
			
		||||
 | 
			
		||||
#define GLU_PATH_LENGTH			100215
 | 
			
		||||
#define GLU_PARAMETRIC_ERROR		100216
 | 
			
		||||
#define GLU_DOMAIN_DISTANCE		100217
 | 
			
		||||
 | 
			
		||||
#define GLU_MAP1_TRIM_2			100210
 | 
			
		||||
#define GLU_MAP1_TRIM_3			100211
 | 
			
		||||
 | 
			
		||||
#define GLU_OUTLINE_POLYGON		100240
 | 
			
		||||
#define GLU_OUTLINE_PATCH		100241
 | 
			
		||||
 | 
			
		||||
#define GLU_NURBS_ERROR1	100251   /* spline order un-supported */
 | 
			
		||||
#define GLU_NURBS_ERROR2	100252   /* too few knots */
 | 
			
		||||
#define GLU_NURBS_ERROR3	100253   /* valid knot range is empty */
 | 
			
		||||
#define GLU_NURBS_ERROR4	100254   /* decreasing knot sequence */
 | 
			
		||||
#define GLU_NURBS_ERROR5	100255   /* knot multiplicity > spline order */
 | 
			
		||||
#define GLU_NURBS_ERROR6	100256   /* endcurve() must follow bgncurve() */
 | 
			
		||||
#define GLU_NURBS_ERROR7	100257   /* bgncurve() must precede endcurve() */
 | 
			
		||||
#define GLU_NURBS_ERROR8	100258   /* ctrlarray or knot vector is NULL */
 | 
			
		||||
#define GLU_NURBS_ERROR9 	100259   /* can't draw pwlcurves */
 | 
			
		||||
#define GLU_NURBS_ERROR10	100260   /* missing gluNurbsCurve() */
 | 
			
		||||
#define GLU_NURBS_ERROR11	100261   /* missing gluNurbsSurface() */
 | 
			
		||||
#define GLU_NURBS_ERROR12	100262   /* endtrim() must precede endsurface() */
 | 
			
		||||
#define GLU_NURBS_ERROR13	100263   /* bgnsurface() must precede endsurface() */
 | 
			
		||||
#define GLU_NURBS_ERROR14	100264   /* curve of improper type passed as trim curve */
 | 
			
		||||
#define GLU_NURBS_ERROR15	100265   /* bgnsurface() must precede bgntrim() */
 | 
			
		||||
#define GLU_NURBS_ERROR16	100266   /* endtrim() must follow bgntrim() */
 | 
			
		||||
#define GLU_NURBS_ERROR17	100267   /* bgntrim() must precede endtrim()*/
 | 
			
		||||
#define GLU_NURBS_ERROR18	100268   /* invalid or missing trim curve*/
 | 
			
		||||
#define GLU_NURBS_ERROR19	100269   /* bgntrim() must precede pwlcurve() */
 | 
			
		||||
#define GLU_NURBS_ERROR20	100270   /* pwlcurve referenced twice*/
 | 
			
		||||
#define GLU_NURBS_ERROR21	100271   /* pwlcurve and nurbscurve mixed */
 | 
			
		||||
#define GLU_NURBS_ERROR22	100272   /* improper usage of trim data type */
 | 
			
		||||
#define GLU_NURBS_ERROR23	100273   /* nurbscurve referenced twice */
 | 
			
		||||
#define GLU_NURBS_ERROR24	100274   /* nurbscurve and pwlcurve mixed */
 | 
			
		||||
#define GLU_NURBS_ERROR25	100275   /* nurbssurface referenced twice */
 | 
			
		||||
#define GLU_NURBS_ERROR26	100276   /* invalid property */
 | 
			
		||||
#define GLU_NURBS_ERROR27	100277   /* endsurface() must follow bgnsurface() */
 | 
			
		||||
#define GLU_NURBS_ERROR28	100278   /* intersecting or misoriented trim curves */
 | 
			
		||||
#define GLU_NURBS_ERROR29	100279   /* intersecting trim curves */
 | 
			
		||||
#define GLU_NURBS_ERROR30	100280   /* UNUSED */
 | 
			
		||||
#define GLU_NURBS_ERROR31	100281   /* unconnected trim curves */
 | 
			
		||||
#define GLU_NURBS_ERROR32	100282   /* unknown knot error */
 | 
			
		||||
#define GLU_NURBS_ERROR33	100283   /* negative vertex count encountered */
 | 
			
		||||
#define GLU_NURBS_ERROR34	100284   /* negative byte-stride */
 | 
			
		||||
#define GLU_NURBS_ERROR35	100285   /* unknown type descriptor */
 | 
			
		||||
#define GLU_NURBS_ERROR36	100286   /* null control point reference */
 | 
			
		||||
#define GLU_NURBS_ERROR37	100287   /* duplicate point on pwlcurve */
 | 
			
		||||
 | 
			
		||||
/* Errors */
 | 
			
		||||
#define GLU_INVALID_ENUM		100900
 | 
			
		||||
#define GLU_INVALID_VALUE		100901
 | 
			
		||||
#define GLU_OUT_OF_MEMORY		100902
 | 
			
		||||
#define GLU_INCOMPATIBLE_GL_VERSION	100903
 | 
			
		||||
 | 
			
		||||
/* New in GLU 1.1 */
 | 
			
		||||
#define GLU_VERSION			100800
 | 
			
		||||
#define GLU_EXTENSIONS			100801
 | 
			
		||||
 | 
			
		||||
/*** GLU 1.0 tessellation - obsolete! ***/
 | 
			
		||||
 | 
			
		||||
/* Contour types */
 | 
			
		||||
#define GLU_CW				100120
 | 
			
		||||
#define GLU_CCW				100121
 | 
			
		||||
#define GLU_INTERIOR			100122
 | 
			
		||||
#define GLU_EXTERIOR			100123
 | 
			
		||||
#define GLU_UNKNOWN			100124
 | 
			
		||||
 | 
			
		||||
/* Tessellator */
 | 
			
		||||
#define GLU_BEGIN			GLU_TESS_BEGIN
 | 
			
		||||
#define GLU_VERTEX			GLU_TESS_VERTEX
 | 
			
		||||
#define GLU_END				GLU_TESS_END
 | 
			
		||||
#define GLU_ERROR			GLU_TESS_ERROR
 | 
			
		||||
#define GLU_EDGE_FLAG			GLU_TESS_EDGE_FLAG
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * These are the GLU 1.1 typedefs.  GLU 1.3 has different ones!
 | 
			
		||||
 */
 | 
			
		||||
#if defined(__BEOS__)
 | 
			
		||||
    /* The BeOS does something funky and makes these typedefs in one
 | 
			
		||||
     * of its system headers.
 | 
			
		||||
     */
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
class GLUnurbs;
 | 
			
		||||
class GLUquadric;
 | 
			
		||||
class GLUtesselator;
 | 
			
		||||
#else
 | 
			
		||||
    typedef struct GLUquadric GLUquadricObj;
 | 
			
		||||
    typedef struct GLUnurbs GLUnurbsObj;
 | 
			
		||||
 | 
			
		||||
    /* FIXME: We need to implement the other 1.3 typedefs - GH */
 | 
			
		||||
    typedef struct GLUtesselator GLUtesselator;
 | 
			
		||||
    typedef GLUtesselator GLUtriangulatorObj;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if defined(__BEOS__) || defined(__QUICKDRAW__)
 | 
			
		||||
#pragma export on
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 *
 | 
			
		||||
 * Miscellaneous functions
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluLookAt( GLdouble eyex, GLdouble eyey, GLdouble eyez,
 | 
			
		||||
                                  GLdouble centerx, GLdouble centery,
 | 
			
		||||
                                  GLdouble centerz,
 | 
			
		||||
                                  GLdouble upx, GLdouble upy, GLdouble upz );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluOrtho2D( GLdouble left, GLdouble right,
 | 
			
		||||
                                   GLdouble bottom, GLdouble top );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluPerspective( GLdouble fovy, GLdouble aspect,
 | 
			
		||||
                                       GLdouble zNear, GLdouble zFar );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluPickMatrix( GLdouble x, GLdouble y,
 | 
			
		||||
                                      GLdouble width, GLdouble height,
 | 
			
		||||
                                      const GLint viewport[4] );
 | 
			
		||||
 | 
			
		||||
GLUAPI GLint GLAPIENTRY gluProject( GLdouble objx, GLdouble objy, GLdouble objz,
 | 
			
		||||
                                    const GLdouble modelMatrix[16],
 | 
			
		||||
                                    const GLdouble projMatrix[16],
 | 
			
		||||
                                    const GLint viewport[4],
 | 
			
		||||
                                    GLdouble *winx, GLdouble *winy,
 | 
			
		||||
                                    GLdouble *winz );
 | 
			
		||||
 | 
			
		||||
GLUAPI GLint GLAPIENTRY gluUnProject( GLdouble winx, GLdouble winy,
 | 
			
		||||
                                      GLdouble winz,
 | 
			
		||||
                                      const GLdouble modelMatrix[16],
 | 
			
		||||
                                      const GLdouble projMatrix[16],
 | 
			
		||||
                                      const GLint viewport[4],
 | 
			
		||||
                                      GLdouble *objx, GLdouble *objy,
 | 
			
		||||
                                      GLdouble *objz );
 | 
			
		||||
 | 
			
		||||
GLUAPI const GLubyte* GLAPIENTRY gluErrorString( GLenum errorCode );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 *
 | 
			
		||||
 * Mipmapping and image scaling
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
GLUAPI GLint GLAPIENTRY gluScaleImage( GLenum format,
 | 
			
		||||
                                       GLint widthin, GLint heightin,
 | 
			
		||||
                                       GLenum typein, const void *datain,
 | 
			
		||||
                                       GLint widthout, GLint heightout,
 | 
			
		||||
                                       GLenum typeout, void *dataout );
 | 
			
		||||
 | 
			
		||||
GLUAPI GLint GLAPIENTRY gluBuild1DMipmaps( GLenum target, GLint components,
 | 
			
		||||
                                           GLint width, GLenum format,
 | 
			
		||||
                                           GLenum type, const void *data );
 | 
			
		||||
 | 
			
		||||
GLUAPI GLint GLAPIENTRY gluBuild2DMipmaps( GLenum target, GLint components,
 | 
			
		||||
                                           GLint width, GLint height,
 | 
			
		||||
                                           GLenum format,
 | 
			
		||||
                                           GLenum type, const void *data );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 *
 | 
			
		||||
 * Quadrics
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
GLUAPI GLUquadricObj* GLAPIENTRY gluNewQuadric( void );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluDeleteQuadric( GLUquadricObj *state );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluQuadricDrawStyle( GLUquadricObj *quadObject,
 | 
			
		||||
                                            GLenum drawStyle );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluQuadricOrientation( GLUquadricObj *quadObject,
 | 
			
		||||
                                              GLenum orientation );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluQuadricNormals( GLUquadricObj *quadObject,
 | 
			
		||||
                                          GLenum normals );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluQuadricTexture( GLUquadricObj *quadObject,
 | 
			
		||||
                                          GLboolean textureCoords );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluQuadricCallback( GLUquadricObj *qobj,
 | 
			
		||||
                                           GLenum which,
 | 
			
		||||
                                           void (GLCALLBACK *fn)() );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluCylinder( GLUquadricObj *qobj,
 | 
			
		||||
                                    GLdouble baseRadius,
 | 
			
		||||
                                    GLdouble topRadius,
 | 
			
		||||
                                    GLdouble height,
 | 
			
		||||
                                    GLint slices, GLint stacks );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluSphere( GLUquadricObj *qobj,
 | 
			
		||||
                                  GLdouble radius, GLint slices,
 | 
			
		||||
                                  GLint stacks );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluDisk( GLUquadricObj *qobj,
 | 
			
		||||
                                GLdouble innerRadius, GLdouble outerRadius,
 | 
			
		||||
                                GLint slices, GLint loops );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluPartialDisk( GLUquadricObj *qobj, GLdouble innerRadius,
 | 
			
		||||
                                       GLdouble outerRadius, GLint slices,
 | 
			
		||||
                                       GLint loops, GLdouble startAngle,
 | 
			
		||||
                                       GLdouble sweepAngle );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 *
 | 
			
		||||
 * Nurbs
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
GLUAPI GLUnurbsObj* GLAPIENTRY gluNewNurbsRenderer( void );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluDeleteNurbsRenderer( GLUnurbsObj *nobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluLoadSamplingMatrices( GLUnurbsObj *nobj,
 | 
			
		||||
                                                const GLfloat modelMatrix[16],
 | 
			
		||||
                                                const GLfloat projMatrix[16],
 | 
			
		||||
                                                const GLint viewport[4] );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluNurbsProperty( GLUnurbsObj *nobj, GLenum property,
 | 
			
		||||
                                         GLfloat value );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluGetNurbsProperty( GLUnurbsObj *nobj, GLenum property,
 | 
			
		||||
                                            GLfloat *value );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluBeginCurve( GLUnurbsObj *nobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluEndCurve( GLUnurbsObj * nobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluNurbsCurve( GLUnurbsObj *nobj, GLint nknots,
 | 
			
		||||
                                      GLfloat *knot, GLint stride,
 | 
			
		||||
                                      GLfloat *ctlarray, GLint order,
 | 
			
		||||
                                      GLenum type );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluBeginSurface( GLUnurbsObj *nobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluEndSurface( GLUnurbsObj * nobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluNurbsSurface( GLUnurbsObj *nobj,
 | 
			
		||||
                                        GLint sknot_count, GLfloat *sknot,
 | 
			
		||||
                                        GLint tknot_count, GLfloat *tknot,
 | 
			
		||||
                                        GLint s_stride, GLint t_stride,
 | 
			
		||||
                                        GLfloat *ctlarray,
 | 
			
		||||
                                        GLint sorder, GLint torder,
 | 
			
		||||
                                        GLenum type );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluBeginTrim( GLUnurbsObj *nobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluEndTrim( GLUnurbsObj *nobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluPwlCurve( GLUnurbsObj *nobj, GLint count,
 | 
			
		||||
                                    GLfloat *array, GLint stride,
 | 
			
		||||
                                    GLenum type );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluNurbsCallback( GLUnurbsObj *nobj, GLenum which,
 | 
			
		||||
                                         void (GLCALLBACK *fn)() );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 *
 | 
			
		||||
 * Polygon tessellation
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
GLUAPI GLUtesselator* GLAPIENTRY gluNewTess( void );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluDeleteTess( GLUtesselator *tobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluTessBeginPolygon( GLUtesselator *tobj,
 | 
			
		||||
					    void *polygon_data );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluTessBeginContour( GLUtesselator *tobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluTessVertex( GLUtesselator *tobj, GLdouble coords[3],
 | 
			
		||||
				      void *vertex_data );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluTessEndContour( GLUtesselator *tobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluTessEndPolygon( GLUtesselator *tobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluTessProperty( GLUtesselator *tobj, GLenum which,
 | 
			
		||||
					GLdouble value );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluTessNormal( GLUtesselator *tobj, GLdouble x,
 | 
			
		||||
				      GLdouble y, GLdouble z );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluTessCallback( GLUtesselator *tobj, GLenum which,
 | 
			
		||||
					void (GLCALLBACK *fn)() );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluGetTessProperty( GLUtesselator *tobj, GLenum which,
 | 
			
		||||
					   GLdouble *value );
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 *
 | 
			
		||||
 * Obsolete 1.0 tessellation functions
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluBeginPolygon( GLUtesselator *tobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluNextContour( GLUtesselator *tobj, GLenum type );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluEndPolygon( GLUtesselator *tobj );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 *
 | 
			
		||||
 * New functions in GLU 1.1
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
GLUAPI const GLubyte* GLAPIENTRY gluGetString( GLenum name );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if defined(__BEOS__) || defined(__QUICKDRAW__)
 | 
			
		||||
#pragma export off
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef macintosh
 | 
			
		||||
	#pragma enumsalwaysint reset
 | 
			
		||||
	#if PRAGMA_IMPORT_SUPPORTED
 | 
			
		||||
	#pragma import off
 | 
			
		||||
	#endif
 | 
			
		||||
typedef struct GLUnurbs GLUnurbs;
 | 
			
		||||
typedef struct GLUquadric GLUquadric;
 | 
			
		||||
typedef struct GLUtesselator GLUtesselator;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
typedef GLUnurbs GLUnurbsObj;
 | 
			
		||||
typedef GLUquadric GLUquadricObj;
 | 
			
		||||
typedef GLUtesselator GLUtesselatorObj;
 | 
			
		||||
typedef GLUtesselator GLUtriangulatorObj;
 | 
			
		||||
 | 
			
		||||
#define GLU_TESS_MAX_COORD 1.0e150
 | 
			
		||||
 | 
			
		||||
/* Internal convenience typedefs */
 | 
			
		||||
typedef void (GLAPIENTRY *_GLUfuncptr)();
 | 
			
		||||
 | 
			
		||||
GLAPI void GLAPIENTRY gluBeginCurve (GLUnurbs* nurb);
 | 
			
		||||
GLAPI void GLAPIENTRY gluBeginPolygon (GLUtesselator* tess);
 | 
			
		||||
GLAPI void GLAPIENTRY gluBeginSurface (GLUnurbs* nurb);
 | 
			
		||||
GLAPI void GLAPIENTRY gluBeginTrim (GLUnurbs* nurb);
 | 
			
		||||
GLAPI GLint GLAPIENTRY gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
 | 
			
		||||
GLAPI GLint GLAPIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
 | 
			
		||||
GLAPI GLint GLAPIENTRY gluBuild2DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
 | 
			
		||||
GLAPI GLint GLAPIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data);
 | 
			
		||||
GLAPI GLint GLAPIENTRY gluBuild3DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
 | 
			
		||||
GLAPI GLint GLAPIENTRY gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
 | 
			
		||||
GLAPI GLboolean GLAPIENTRY gluCheckExtension (const GLubyte *extName, const GLubyte *extString);
 | 
			
		||||
GLAPI void GLAPIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
 | 
			
		||||
GLAPI void GLAPIENTRY gluDeleteNurbsRenderer (GLUnurbs* nurb);
 | 
			
		||||
GLAPI void GLAPIENTRY gluDeleteQuadric (GLUquadric* quad);
 | 
			
		||||
GLAPI void GLAPIENTRY gluDeleteTess (GLUtesselator* tess);
 | 
			
		||||
GLAPI void GLAPIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
 | 
			
		||||
GLAPI void GLAPIENTRY gluEndCurve (GLUnurbs* nurb);
 | 
			
		||||
GLAPI void GLAPIENTRY gluEndPolygon (GLUtesselator* tess);
 | 
			
		||||
GLAPI void GLAPIENTRY gluEndSurface (GLUnurbs* nurb);
 | 
			
		||||
GLAPI void GLAPIENTRY gluEndTrim (GLUnurbs* nurb);
 | 
			
		||||
GLAPI const GLubyte * GLAPIENTRY gluErrorString (GLenum error);
 | 
			
		||||
GLAPI void GLAPIENTRY gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
 | 
			
		||||
GLAPI const GLubyte * GLAPIENTRY gluGetString (GLenum name);
 | 
			
		||||
GLAPI void GLAPIENTRY gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
 | 
			
		||||
GLAPI void GLAPIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
 | 
			
		||||
GLAPI void GLAPIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
 | 
			
		||||
GLAPI GLUnurbs* GLAPIENTRY gluNewNurbsRenderer (void);
 | 
			
		||||
GLAPI GLUquadric* GLAPIENTRY gluNewQuadric (void);
 | 
			
		||||
GLAPI GLUtesselator* GLAPIENTRY gluNewTess (void);
 | 
			
		||||
GLAPI void GLAPIENTRY gluNextContour (GLUtesselator* tess, GLenum type);
 | 
			
		||||
GLAPI void GLAPIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
 | 
			
		||||
GLAPI void GLAPIENTRY gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData);
 | 
			
		||||
GLAPI void GLAPIENTRY gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData);
 | 
			
		||||
GLAPI void GLAPIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
 | 
			
		||||
GLAPI void GLAPIENTRY gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
 | 
			
		||||
GLAPI void GLAPIENTRY gluNurbsSurface (GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type);
 | 
			
		||||
GLAPI void GLAPIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
 | 
			
		||||
GLAPI void GLAPIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
 | 
			
		||||
GLAPI void GLAPIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
 | 
			
		||||
GLAPI void GLAPIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
 | 
			
		||||
GLAPI GLint GLAPIENTRY gluProject (GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ);
 | 
			
		||||
GLAPI void GLAPIENTRY gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
 | 
			
		||||
GLAPI void GLAPIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
 | 
			
		||||
GLAPI void GLAPIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
 | 
			
		||||
GLAPI void GLAPIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal);
 | 
			
		||||
GLAPI void GLAPIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
 | 
			
		||||
GLAPI void GLAPIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture);
 | 
			
		||||
GLAPI GLint GLAPIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
 | 
			
		||||
GLAPI void GLAPIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
 | 
			
		||||
GLAPI void GLAPIENTRY gluTessBeginContour (GLUtesselator* tess);
 | 
			
		||||
GLAPI void GLAPIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
 | 
			
		||||
GLAPI void GLAPIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
 | 
			
		||||
GLAPI void GLAPIENTRY gluTessEndContour (GLUtesselator* tess);
 | 
			
		||||
GLAPI void GLAPIENTRY gluTessEndPolygon (GLUtesselator* tess);
 | 
			
		||||
GLAPI void GLAPIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
 | 
			
		||||
GLAPI void GLAPIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
 | 
			
		||||
GLAPI void GLAPIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
 | 
			
		||||
GLAPI GLint GLAPIENTRY gluUnProject (GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ);
 | 
			
		||||
GLAPI GLint GLAPIENTRY gluUnProject4 (GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble nearVal, GLdouble farVal, GLdouble* objX, GLdouble* objY, GLdouble* objZ, GLdouble* objW);
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
#endif /* __glu_h__ */
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: glu_mangle.h,v 1.2 1999/09/10 02:08:19 gareth Exp $ */
 | 
			
		||||
/* $Id: glu_mangle.h,v 1.3 2001/09/20 22:18:47 kschultz Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -23,6 +23,9 @@
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: glu_mangle.h,v $
 | 
			
		||||
 * Revision 1.3  2001/09/20 22:18:47  kschultz
 | 
			
		||||
 * add mangling for new entry points
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.2  1999/09/10 02:08:19  gareth
 | 
			
		||||
 * Added GLU 1.3 tessellation (except winding rule code).
 | 
			
		||||
 *
 | 
			
		||||
@@ -92,5 +95,11 @@
 | 
			
		||||
#define gluNextContour mgluNextContour
 | 
			
		||||
#define gluEndPolygon mgluEndPolygon
 | 
			
		||||
#define gluGetString mgluGetString
 | 
			
		||||
#define gluBuild1DMipmapLevels mgluBuild1DMipmapLevels
 | 
			
		||||
#define gluBuild2DMipmapLevels mgluBuild2DMipmapLevels
 | 
			
		||||
#define gluBuild3DMipmapLevels mgluBuild3DMipmapLevels
 | 
			
		||||
#define gluBuild3DMipmaps mgluBuild3DMipmaps
 | 
			
		||||
#define gluCheckExtension mgluCheckExtension
 | 
			
		||||
#define gluUnProject4 mgluUnProject4
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -108,7 +108,7 @@ extern _CRTIMP void __cdecl exit(int);
 | 
			
		||||
   and redifinition of Windows system defs, also removes requirement of
 | 
			
		||||
   pretty much any standard windows header from this file */
 | 
			
		||||
 | 
			
		||||
#if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
 | 
			
		||||
#if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__CYGWIN32__)
 | 
			
		||||
#	define GLUTAPIENTRY __stdcall
 | 
			
		||||
#else
 | 
			
		||||
#	define GLUTAPIENTRY
 | 
			
		||||
@@ -152,7 +152,7 @@ typedef unsigned long COLORREF;
 | 
			
		||||
#		define wglUseFontOutlines  wglUseFontOutlinesA
 | 
			
		||||
#	endif /* !UNICODE */
 | 
			
		||||
typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR;
 | 
			
		||||
typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT
 | 
			
		||||
typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT;
 | 
			
		||||
#  pragma warning( push )
 | 
			
		||||
#  pragma warning( disable : 4273 ) /* 'function' : inconsistent DLL linkage. dllexport assumed. */
 | 
			
		||||
#  define WGLAPI __declspec(dllimport)
 | 
			
		||||
@@ -183,7 +183,7 @@ WGLAPI int   GLAPIENTRY wglUseFontOutlinesA(HDC, unsigned long, unsigned long, u
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglUseFontOutlinesW(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
 | 
			
		||||
WGLAPI int   GLAPIENTRY SwapBuffers(HDC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY ChoosePixelFormat(HDC,const PIXELFORMATDESCRIPTOR *);
 | 
			
		||||
WGLAPI int   GLAPIENTRY DescribePixelFormat(HDC,int,unsigned long,LPPIXELFORMATDESCRIPTOR);
 | 
			
		||||
WGLAPI int   GLAPIENTRY DescribePixelFormat(HDC,int,unsigned int,LPPIXELFORMATDESCRIPTOR);
 | 
			
		||||
WGLAPI int   GLAPIENTRY GetPixelFormat(HDC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR *);
 | 
			
		||||
#  undef WGLAPI
 | 
			
		||||
@@ -199,7 +199,7 @@ WGLAPI int   GLAPIENTRY SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR *);
 | 
			
		||||
#  define GLUTCALLBACK
 | 
			
		||||
#  define GLUTAPI extern
 | 
			
		||||
/* Prototype exit for the non-Win32 case (see above). */
 | 
			
		||||
extern void exit(int);
 | 
			
		||||
/*extern void exit(int);  this screws up gcc -ansi -pedantic! */
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -739,7 +739,6 @@ GLUTAPI int GLUTAPIENTRY glutGameModeGet(GLenum mode);
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if 0
 | 
			
		||||
 
 | 
			
		||||
@@ -3,8 +3,8 @@
 | 
			
		||||
 | 
			
		||||
/* Copyright (c) Mark J. Kilgard & Willam F. Mitchell, 1998. */
 | 
			
		||||
 | 
			
		||||
/* This program is freely distributable without licensing fees
 | 
			
		||||
   and is provided without guarantee or warrantee expressed or
 | 
			
		||||
/* This program is freely distributable without licensing fees 
 | 
			
		||||
   and is provided without guarantee or warrantee expressed or 
 | 
			
		||||
   implied. This program is -not- in the public domain. */
 | 
			
		||||
 | 
			
		||||
/* This header provides the binding interface for William Mitchell's
 | 
			
		||||
@@ -75,7 +75,7 @@ typedef void (GLUTCALLBACK *GLUTmenuStatusFCB) (int *, int *, int *);
 | 
			
		||||
typedef void (GLUTCALLBACK *GLUTidleFCB) (void);
 | 
			
		||||
 | 
			
		||||
/* Functions that set and return Fortran callback functions. */
 | 
			
		||||
extern void* GLUTAPIENTRY __glutGetFCB(int which);
 | 
			
		||||
extern void GLUTAPIENTRY __glutSetFCB(int which, void *func);
 | 
			
		||||
GLUTAPI void* APIENTRY __glutGetFCB(int which);
 | 
			
		||||
GLUTAPI void APIENTRY __glutSetFCB(int which, void *func);
 | 
			
		||||
 | 
			
		||||
#endif  /* __glutf90_h__ */
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										384
									
								
								include/GL/glx.h
									
									
									
									
									
								
							
							
						
						
									
										384
									
								
								include/GL/glx.h
									
									
									
									
									
								
							@@ -1,10 +1,10 @@
 | 
			
		||||
/* $Id: glx.h,v 1.6 1999/11/11 01:27:17 brianp Exp $ */
 | 
			
		||||
/* $Id: glx.h,v 1.33.2.4 2002/09/20 17:36:33 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Version:  4.0.3
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (C) 1999  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * Copyright (C) 1999-2002  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * 
 | 
			
		||||
 * Permission is hereby granted, free of charge, to any person obtaining a
 | 
			
		||||
 * copy of this software and associated documentation files (the "Software"),
 | 
			
		||||
@@ -25,21 +25,30 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_H
 | 
			
		||||
#define GLX_H
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef __VMS
 | 
			
		||||
#include <GL/vms_x_fix.h>
 | 
			
		||||
# ifdef __cplusplus
 | 
			
		||||
/* VMS Xlib.h gives problems with C++.
 | 
			
		||||
 * this avoids a bunch of trivial warnings */
 | 
			
		||||
#pragma message disable nosimpint
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
#include <X11/Xlib.h>
 | 
			
		||||
#include <X11/Xutil.h>
 | 
			
		||||
#include "GL/gl.h"
 | 
			
		||||
#ifdef MESA
 | 
			
		||||
#include "GL/xmesa.h"
 | 
			
		||||
#ifdef __VMS
 | 
			
		||||
# ifdef __cplusplus
 | 
			
		||||
#pragma message enable nosimpint
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
#include <GL/gl.h>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if defined(USE_MGL_NAMESPACE)
 | 
			
		||||
#include "glx_mangle.h"
 | 
			
		||||
#include <GL/glx_mangle.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -49,6 +58,9 @@ extern "C" {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define GLX_VERSION_1_1		1
 | 
			
		||||
#define GLX_VERSION_1_2		1
 | 
			
		||||
#define GLX_VERSION_1_3		1
 | 
			
		||||
#define GLX_VERSION_1_4		1
 | 
			
		||||
 | 
			
		||||
#define GLX_EXTENSION_NAME   "GLX"
 | 
			
		||||
 | 
			
		||||
@@ -76,17 +88,6 @@ extern "C" {
 | 
			
		||||
#define GLX_ACCUM_ALPHA_SIZE	17
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* GLX_EXT_visual_info extension */
 | 
			
		||||
#define GLX_X_VISUAL_TYPE_EXT		0x22
 | 
			
		||||
#define GLX_TRANSPARENT_TYPE_EXT	0x23
 | 
			
		||||
#define GLX_TRANSPARENT_INDEX_VALUE_EXT	0x24
 | 
			
		||||
#define GLX_TRANSPARENT_RED_VALUE_EXT	0x25
 | 
			
		||||
#define GLX_TRANSPARENT_GREEN_VALUE_EXT	0x26
 | 
			
		||||
#define GLX_TRANSPARENT_BLUE_VALUE_EXT	0x27
 | 
			
		||||
#define GLX_TRANSPARENT_ALPHA_VALUE_EXT	0x28
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Error codes returned by glXGetConfig:
 | 
			
		||||
 */
 | 
			
		||||
@@ -108,42 +109,83 @@ extern "C" {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * GLX_visual_info extension
 | 
			
		||||
 * GLX 1.3 and later:
 | 
			
		||||
 */
 | 
			
		||||
#define GLX_TRUE_COLOR_EXT		0x8002
 | 
			
		||||
#define GLX_DIRECT_COLOR_EXT		0x8003
 | 
			
		||||
#define GLX_PSEUDO_COLOR_EXT		0x8004
 | 
			
		||||
#define GLX_STATIC_COLOR_EXT		0x8005
 | 
			
		||||
#define GLX_GRAY_SCALE_EXT		0x8006
 | 
			
		||||
#define GLX_STATIC_GRAY_EXT		0x8007
 | 
			
		||||
#define GLX_NONE_EXT			0x8000
 | 
			
		||||
#define GLX_TRANSPARENT_RGB_EXT		0x8008
 | 
			
		||||
#define GLX_TRANSPARENT_INDEX_EXT	0x8009
 | 
			
		||||
#define GLX_CONFIG_CAVEAT		0x20
 | 
			
		||||
#define GLX_DONT_CARE			0xFFFFFFFF
 | 
			
		||||
#define GLX_SLOW_CONFIG			0x8001
 | 
			
		||||
#define GLX_NON_CONFORMANT_CONFIG	0x800D
 | 
			
		||||
#define GLX_X_VISUAL_TYPE		0x22
 | 
			
		||||
#define GLX_TRANSPARENT_TYPE		0x23
 | 
			
		||||
#define GLX_TRANSPARENT_INDEX_VALUE	0x24
 | 
			
		||||
#define GLX_TRANSPARENT_RED_VALUE	0x25
 | 
			
		||||
#define GLX_TRANSPARENT_GREEN_VALUE	0x26
 | 
			
		||||
#define GLX_TRANSPARENT_BLUE_VALUE	0x27
 | 
			
		||||
#define GLX_TRANSPARENT_ALPHA_VALUE	0x28
 | 
			
		||||
#define GLX_MAX_PBUFFER_WIDTH		0x8016
 | 
			
		||||
#define GLX_MAX_PBUFFER_HEIGHT		0x8017
 | 
			
		||||
#define GLX_MAX_PBUFFER_PIXELS		0x8018
 | 
			
		||||
#define GLX_PRESERVED_CONTENTS		0x801B
 | 
			
		||||
#define GLX_LARGEST_PBUFFER		0x801C
 | 
			
		||||
#define GLX_WIDTH			0x801D
 | 
			
		||||
#define GLX_HEIGHT			0x801E
 | 
			
		||||
#define GLX_EVENT_MASK			0x801F
 | 
			
		||||
#define GLX_DRAWABLE_TYPE		0x8010
 | 
			
		||||
#define GLX_FBCONFIG_ID			0x8013
 | 
			
		||||
#define GLX_VISUAL_ID			0x800B
 | 
			
		||||
#define GLX_WINDOW_BIT			0x00000001
 | 
			
		||||
#define GLX_PIXMAP_BIT			0x00000002
 | 
			
		||||
#define GLX_PBUFFER_BIT			0x00000004
 | 
			
		||||
#define GLX_AUX_BUFFERS_BIT		0x00000010
 | 
			
		||||
#define GLX_FRONT_LEFT_BUFFER_BIT	0x00000001
 | 
			
		||||
#define GLX_FRONT_RIGHT_BUFFER_BIT	0x00000002
 | 
			
		||||
#define GLX_BACK_LEFT_BUFFER_BIT	0x00000004
 | 
			
		||||
#define GLX_BACK_RIGHT_BUFFER_BIT	0x00000008
 | 
			
		||||
#define GLX_DEPTH_BUFFER_BIT		0x00000020
 | 
			
		||||
#define GLX_STENCIL_BUFFER_BIT		0x00000040
 | 
			
		||||
#define GLX_ACCUM_BUFFER_BIT		0x00000080
 | 
			
		||||
#define GLX_DRAWABLE_TYPE		0x8010
 | 
			
		||||
#define GLX_RENDER_TYPE			0x8011
 | 
			
		||||
#define GLX_X_RENDERABLE		0x8012
 | 
			
		||||
#define GLX_NONE			0x8000
 | 
			
		||||
#define GLX_TRUE_COLOR			0x8002
 | 
			
		||||
#define GLX_DIRECT_COLOR		0x8003
 | 
			
		||||
#define GLX_PSEUDO_COLOR		0x8004
 | 
			
		||||
#define GLX_STATIC_COLOR		0x8005
 | 
			
		||||
#define GLX_GRAY_SCALE			0x8006
 | 
			
		||||
#define GLX_STATIC_GRAY			0x8007
 | 
			
		||||
#define GLX_TRANSPARENT_INDEX		0x8009
 | 
			
		||||
#define GLX_RGBA_TYPE			0x8014
 | 
			
		||||
#define GLX_COLOR_INDEX_TYPE		0x8015
 | 
			
		||||
#define GLX_COLOR_INDEX_BIT		0x00000002
 | 
			
		||||
#define GLX_RGBA_BIT			0x00000001
 | 
			
		||||
#define GLX_SCREEN			0x800C
 | 
			
		||||
#define GLX_PBUFFER_CLOBBER_MASK	0x08000000
 | 
			
		||||
#define GLX_DAMAGED			0x8020
 | 
			
		||||
#define GLX_SAVED			0x8021
 | 
			
		||||
#define GLX_WINDOW			0x8022
 | 
			
		||||
#define GLX_PBUFFER			0x8023
 | 
			
		||||
#define GLX_PBUFFER_HEIGHT              0x8040
 | 
			
		||||
#define GLX_PBUFFER_WIDTH               0x8041
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Compile-time extension tests
 | 
			
		||||
 * GLX 1.4 and later:
 | 
			
		||||
 */
 | 
			
		||||
#define GLX_EXT_visual_info		1
 | 
			
		||||
#define GLX_EXT_get_proc_address	1
 | 
			
		||||
#define GLX_MESA_pixmap_colormap	1
 | 
			
		||||
#define GLX_MESA_release_buffers	1
 | 
			
		||||
#define GLX_MESA_copy_sub_buffer	1
 | 
			
		||||
#define GLX_MESA_set_3dfx_mode		1
 | 
			
		||||
#define GLX_SGI_video_sync		1
 | 
			
		||||
#define GLX_SAMPLE_BUFFERS              0x186a0 /*100000*/
 | 
			
		||||
#define GLX_SAMPLES                     0x186a1 /*100001*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef MESA
 | 
			
		||||
   typedef XMesaContext GLXContext;
 | 
			
		||||
   typedef Pixmap GLXPixmap;
 | 
			
		||||
   typedef Drawable GLXDrawable;
 | 
			
		||||
#else
 | 
			
		||||
   typedef void * GLXContext;
 | 
			
		||||
   typedef XID GLXPixmap;
 | 
			
		||||
   typedef XID GLXDrawable;
 | 
			
		||||
#endif
 | 
			
		||||
typedef struct __GLXcontextRec *GLXContext;
 | 
			
		||||
typedef XID GLXPixmap;
 | 
			
		||||
typedef XID GLXDrawable;
 | 
			
		||||
/* GLX 1.3 and later */
 | 
			
		||||
typedef struct __GLXFBConfigRec *GLXFBConfig;
 | 
			
		||||
typedef XID GLXFBConfigID;
 | 
			
		||||
typedef XID GLXContextID;
 | 
			
		||||
typedef XID GLXWindow;
 | 
			
		||||
typedef XID GLXPbuffer;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -159,7 +201,7 @@ extern Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable,
 | 
			
		||||
			    GLXContext ctx);
 | 
			
		||||
 | 
			
		||||
extern void glXCopyContext( Display *dpy, GLXContext src, GLXContext dst,
 | 
			
		||||
			    GLuint mask );
 | 
			
		||||
			    unsigned long mask );
 | 
			
		||||
 | 
			
		||||
extern void glXSwapBuffers( Display *dpy, GLXDrawable drawable );
 | 
			
		||||
 | 
			
		||||
@@ -197,29 +239,249 @@ extern const char *glXQueryServerString( Display *dpy, int screen, int name );
 | 
			
		||||
extern const char *glXGetClientString( Display *dpy, int name );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* GLX_MESA_pixmap_colormap */
 | 
			
		||||
extern GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual,
 | 
			
		||||
                                         Pixmap pixmap, Colormap cmap );
 | 
			
		||||
/* GLX 1.2 and later */
 | 
			
		||||
extern Display *glXGetCurrentDisplay( void );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* GLX_MESA_release_buffers */
 | 
			
		||||
extern Bool glXReleaseBuffersMESA( Display *dpy, GLXDrawable d );
 | 
			
		||||
/* GLX 1.3 and later */
 | 
			
		||||
extern GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
 | 
			
		||||
                                       const int *attribList, int *nitems );
 | 
			
		||||
 | 
			
		||||
extern int glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config,
 | 
			
		||||
                                 int attribute, int *value );
 | 
			
		||||
 | 
			
		||||
extern GLXFBConfig *glXGetFBConfigs( Display *dpy, int screen,
 | 
			
		||||
                                     int *nelements );
 | 
			
		||||
 | 
			
		||||
extern XVisualInfo *glXGetVisualFromFBConfig( Display *dpy,
 | 
			
		||||
                                              GLXFBConfig config );
 | 
			
		||||
 | 
			
		||||
extern GLXWindow glXCreateWindow( Display *dpy, GLXFBConfig config,
 | 
			
		||||
                                  Window win, const int *attribList );
 | 
			
		||||
 | 
			
		||||
extern void glXDestroyWindow( Display *dpy, GLXWindow window );
 | 
			
		||||
 | 
			
		||||
extern GLXPixmap glXCreatePixmap( Display *dpy, GLXFBConfig config,
 | 
			
		||||
                                  Pixmap pixmap, const int *attribList );
 | 
			
		||||
 | 
			
		||||
extern void glXDestroyPixmap( Display *dpy, GLXPixmap pixmap );
 | 
			
		||||
 | 
			
		||||
extern GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config,
 | 
			
		||||
                                    const int *attribList );
 | 
			
		||||
 | 
			
		||||
extern void glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf );
 | 
			
		||||
 | 
			
		||||
extern void glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute,
 | 
			
		||||
                              unsigned int *value );
 | 
			
		||||
 | 
			
		||||
extern GLXContext glXCreateNewContext( Display *dpy, GLXFBConfig config,
 | 
			
		||||
                                       int renderType, GLXContext shareList,
 | 
			
		||||
                                       Bool direct );
 | 
			
		||||
 | 
			
		||||
extern Bool glXMakeContextCurrent( Display *dpy, GLXDrawable draw,
 | 
			
		||||
                                   GLXDrawable read, GLXContext ctx );
 | 
			
		||||
 | 
			
		||||
extern GLXDrawable glXGetCurrentReadDrawable( void );
 | 
			
		||||
 | 
			
		||||
extern int glXQueryContext( Display *dpy, GLXContext ctx, int attribute,
 | 
			
		||||
                            int *value );
 | 
			
		||||
 | 
			
		||||
extern void glXSelectEvent( Display *dpy, GLXDrawable drawable,
 | 
			
		||||
                            unsigned long mask );
 | 
			
		||||
 | 
			
		||||
extern void glXGetSelectedEvent( Display *dpy, GLXDrawable drawable,
 | 
			
		||||
                                 unsigned long *mask );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* GLX_MESA_copy_sub_buffer */
 | 
			
		||||
/* GLX 1.4 and later */
 | 
			
		||||
extern void (*glXGetProcAddress(const GLubyte *procname))();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_GLXEXT_LEGACY
 | 
			
		||||
 | 
			
		||||
#include <GL/glxext.h>
 | 
			
		||||
 | 
			
		||||
#else
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * 28. GLX_EXT_visual_info extension
 | 
			
		||||
 */
 | 
			
		||||
#ifndef GLX_EXT_visual_info
 | 
			
		||||
#define GLX_EXT_visual_info		1
 | 
			
		||||
 | 
			
		||||
#define GLX_X_VISUAL_TYPE_EXT		0x22
 | 
			
		||||
#define GLX_TRANSPARENT_TYPE_EXT	0x23
 | 
			
		||||
#define GLX_TRANSPARENT_INDEX_VALUE_EXT	0x24
 | 
			
		||||
#define GLX_TRANSPARENT_RED_VALUE_EXT	0x25
 | 
			
		||||
#define GLX_TRANSPARENT_GREEN_VALUE_EXT	0x26
 | 
			
		||||
#define GLX_TRANSPARENT_BLUE_VALUE_EXT	0x27
 | 
			
		||||
#define GLX_TRANSPARENT_ALPHA_VALUE_EXT	0x28
 | 
			
		||||
#define GLX_TRUE_COLOR_EXT		0x8002
 | 
			
		||||
#define GLX_DIRECT_COLOR_EXT		0x8003
 | 
			
		||||
#define GLX_PSEUDO_COLOR_EXT		0x8004
 | 
			
		||||
#define GLX_STATIC_COLOR_EXT		0x8005
 | 
			
		||||
#define GLX_GRAY_SCALE_EXT		0x8006
 | 
			
		||||
#define GLX_STATIC_GRAY_EXT		0x8007
 | 
			
		||||
#define GLX_NONE_EXT			0x8000
 | 
			
		||||
#define GLX_TRANSPARENT_RGB_EXT		0x8008
 | 
			
		||||
#define GLX_TRANSPARENT_INDEX_EXT	0x8009
 | 
			
		||||
 | 
			
		||||
#endif /* 28. GLX_EXT_visual_info extension */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * 41. GLX_SGI_video_sync
 | 
			
		||||
 */
 | 
			
		||||
#ifndef GLX_SGI_video_sync
 | 
			
		||||
#define GLX_SGI_video_sync 1
 | 
			
		||||
 | 
			
		||||
extern int glXGetVideoSyncSGI(unsigned int *count);
 | 
			
		||||
extern int glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count);
 | 
			
		||||
 | 
			
		||||
#endif /* GLX_SGI_video_sync */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * 42. GLX_EXT_visual_rating
 | 
			
		||||
 */
 | 
			
		||||
#ifndef GLX_EXT_visual_rating
 | 
			
		||||
#define GLX_EXT_visual_rating		1
 | 
			
		||||
 | 
			
		||||
#define GLX_VISUAL_CAVEAT_EXT		0x20
 | 
			
		||||
/*#define GLX_NONE_EXT			0x8000*/
 | 
			
		||||
#define GLX_SLOW_VISUAL_EXT		0x8001
 | 
			
		||||
#define GLX_NON_CONFORMANT_VISUAL_EXT	0x800D
 | 
			
		||||
 | 
			
		||||
#endif /* GLX_EXT_visual_rating	*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * 47. GLX_EXT_import_context
 | 
			
		||||
 */
 | 
			
		||||
#ifndef GLX_EXT_import_context
 | 
			
		||||
#define GLX_EXT_import_context 1
 | 
			
		||||
 | 
			
		||||
#define GLX_SHARE_CONTEXT_EXT		0x800A
 | 
			
		||||
#define GLX_VISUAL_ID_EXT		0x800B
 | 
			
		||||
#define GLX_SCREEN_EXT			0x800C
 | 
			
		||||
 | 
			
		||||
extern void glXFreeContextEXT(Display *dpy, GLXContext context);
 | 
			
		||||
 | 
			
		||||
extern GLXContextID glXGetContextIDEXT(const GLXContext context);
 | 
			
		||||
 | 
			
		||||
extern Display *glXGetCurrentDisplayEXT(void);
 | 
			
		||||
 | 
			
		||||
extern GLXContext glXImportContextEXT(Display *dpy, GLXContextID contextID);
 | 
			
		||||
 | 
			
		||||
extern int glXQueryContextInfoEXT(Display *dpy, GLXContext context,
 | 
			
		||||
                                  int attribute,int *value);
 | 
			
		||||
 | 
			
		||||
#endif /* GLX_EXT_import_context */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * 215. GLX_MESA_copy_sub_buffer
 | 
			
		||||
 */
 | 
			
		||||
#ifndef GLX_MESA_copy_sub_buffer
 | 
			
		||||
#define GLX_MESA_copy_sub_buffer 1
 | 
			
		||||
 | 
			
		||||
extern void glXCopySubBufferMESA( Display *dpy, GLXDrawable drawable,
 | 
			
		||||
                                  int x, int y, int width, int height );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* GLX_MESA_set_3dfx_mode */
 | 
			
		||||
extern GLboolean glXSet3DfxModeMESA( GLint mode );
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* GLX_SGI_video_sync */
 | 
			
		||||
extern int glXGetVideoSyncSGI(unsigned int *count);
 | 
			
		||||
extern int glXWaitVideoSyncSGI(int divisor, int remainder,
 | 
			
		||||
                               unsigned int *count);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * 216. GLX_MESA_pixmap_colormap
 | 
			
		||||
 */
 | 
			
		||||
#ifndef GLX_MESA_pixmap_colormap
 | 
			
		||||
#define GLX_MESA_pixmap_colormap 1
 | 
			
		||||
 | 
			
		||||
extern GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual,
 | 
			
		||||
                                         Pixmap pixmap, Colormap cmap );
 | 
			
		||||
 | 
			
		||||
#endif /* GLX_MESA_pixmap_colormap */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * 217. GLX_MESA_release_buffers
 | 
			
		||||
 */
 | 
			
		||||
#ifndef GLX_MESA_release_buffers
 | 
			
		||||
#define GLX_MESA_release_buffers 1
 | 
			
		||||
 | 
			
		||||
extern Bool glXReleaseBuffersMESA( Display *dpy, GLXDrawable d );
 | 
			
		||||
 | 
			
		||||
#endif /* GLX_MESA_release_buffers */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * 218. GLX_MESA_set_3dfx_mode
 | 
			
		||||
 */
 | 
			
		||||
#ifndef GLX_MESA_set_3dfx_mode
 | 
			
		||||
#define GLX_MESA_set_3dfx_mode 1
 | 
			
		||||
 | 
			
		||||
#define GLX_3DFX_WINDOW_MODE_MESA       0x1
 | 
			
		||||
#define GLX_3DFX_FULLSCREEN_MODE_MESA   0x2
 | 
			
		||||
 | 
			
		||||
extern Bool glXSet3DfxModeMESA( int mode );
 | 
			
		||||
 | 
			
		||||
#endif /* GLX_MESA_set_3dfx_mode */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * ARB 2. GLX_ARB_get_proc_address
 | 
			
		||||
 */
 | 
			
		||||
#ifndef GLX_ARB_get_proc_address
 | 
			
		||||
#define GLX_ARB_get_proc_address 1
 | 
			
		||||
 | 
			
		||||
extern void (*glXGetProcAddressARB(const GLubyte *procName))();
 | 
			
		||||
 | 
			
		||||
#endif /* GLX_ARB_get_proc_address */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#endif /* GLX_GLXEXT_LEGACY */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 ** The following aren't in glxext.h yet.
 | 
			
		||||
 **/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * ???. GLX_NV_vertex_array_range
 | 
			
		||||
 */
 | 
			
		||||
#ifndef GLX_NV_vertex_array_range
 | 
			
		||||
#define GLX_NV_vertex_array_range
 | 
			
		||||
 | 
			
		||||
extern void *glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
 | 
			
		||||
extern void glXFreeMemoryNV(GLvoid *pointer);
 | 
			
		||||
typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
 | 
			
		||||
typedef void ( * PFNGLXFREEMEMORYNVPROC) (GLvoid *pointer);
 | 
			
		||||
 | 
			
		||||
#endif /* GLX_NV_vertex_array_range */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * ???. GLX_MESA_agp_offset
 | 
			
		||||
 */ 
 | 
			
		||||
#ifndef GLX_MESA_agp_offset
 | 
			
		||||
#define GLX_MESA_agp_offset 1
 | 
			
		||||
 | 
			
		||||
extern GLuint glXGetAGPOffsetMESA(const GLvoid *pointer);
 | 
			
		||||
typedef GLuint (* PFNGLXGETAGPOFFSETMESAPROC) (const GLvoid *pointer);
 | 
			
		||||
 | 
			
		||||
#endif /* GLX_MESA_agp_offset */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/* $Id: glx_mangle.h,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
 | 
			
		||||
/* $Id: glx_mangle.h,v 1.1.1.1.8.2 2002/09/20 18:32:17 kschultz Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.0
 | 
			
		||||
 * Version:  4.1
 | 
			
		||||
 * Copyright (C) 1995-1998  Brian Paul
 | 
			
		||||
 *
 | 
			
		||||
 * This library is free software; you can redistribute it and/or
 | 
			
		||||
@@ -21,25 +21,6 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: glx_mangle.h,v $
 | 
			
		||||
 * Revision 1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Initial revision
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.3  1999/06/21 22:01:00  brianp
 | 
			
		||||
 * added #ifndef GLX_MANGLE_H stuff, video sync extension functions
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.2  1998/03/26 02:44:53  brianp
 | 
			
		||||
 * removed ^M characters
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.1  1998/03/17 02:41:19  brianp
 | 
			
		||||
 * updated by Randy Frank
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.0  1998/02/20 05:04:45  brianp
 | 
			
		||||
 * initial rev
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_MANGLE_H
 | 
			
		||||
#define GLX_MANGLE_H
 | 
			
		||||
 | 
			
		||||
@@ -60,13 +41,133 @@
 | 
			
		||||
#define glXWaitGL mglXWaitGL
 | 
			
		||||
#define glXWaitX mglXWaitX
 | 
			
		||||
#define glXUseXFont mglXUseXFont
 | 
			
		||||
 | 
			
		||||
/* GLX 1.1 */
 | 
			
		||||
#define glXQueryExtensionsString mglXQueryExtensionsString
 | 
			
		||||
#define glXQueryServerString mglXQueryServerString
 | 
			
		||||
#define glXGetClientString mglXGetClientString
 | 
			
		||||
 | 
			
		||||
/* GLX 1.2 */
 | 
			
		||||
#define glXGetCurrentDisplay mglXGetCurrentDisplay
 | 
			
		||||
 | 
			
		||||
/* GLX 1.3 */
 | 
			
		||||
#define glXChooseFBConfig mglXChooseFBConfig
 | 
			
		||||
#define glXGetFBConfigAttrib mglXGetFBConfigAttrib
 | 
			
		||||
#define glXGetFBConfigs mglXGetFBConfigs 
 | 
			
		||||
#define glXGetVisualFromFBConfig mglXGetVisualFromFBConfig
 | 
			
		||||
#define glXCreateWindow mglXCreateWindow 
 | 
			
		||||
#define glXDestroyWindow mglXDestroyWindow 
 | 
			
		||||
#define glXCreatePixmap mglXCreatePixmap 
 | 
			
		||||
#define glXDestroyPixmap mglXDestroyPixmap 
 | 
			
		||||
#define glXCreatePbuffer mglXCreatePbuffer 
 | 
			
		||||
#define glXDestroyPbuffer mglXDestroyPbuffer 
 | 
			
		||||
#define glXQueryDrawable mglXQueryDrawable 
 | 
			
		||||
#define glXCreateNewContext mglXCreateNewContext 
 | 
			
		||||
#define glXMakeContextCurrent mglXMakeContextCurrent
 | 
			
		||||
#define glXGetCurrentReadDrawable mglXGetCurrentReadDrawable
 | 
			
		||||
#define glXQueryContext mglXQueryContext 
 | 
			
		||||
#define glXSelectEvent mglXSelectEvent 
 | 
			
		||||
#define glXGetSelectedEvent mglXGetSelectedEvent 
 | 
			
		||||
 | 
			
		||||
/* GLX 1.4 */
 | 
			
		||||
#define glXGetProcAddress mglXGetProcAddress
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * 41. GLX_SGI_video_sync
 | 
			
		||||
 */
 | 
			
		||||
#define glXGetVideoSyncSGI mglXGetVideoSyncSGI 
 | 
			
		||||
#define glXWaitVideoSyncSGI mglXWaitVideoSyncSGI
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * 47. GLX_EXT_import_context
 | 
			
		||||
 */
 | 
			
		||||
#define glXFreeContextEXT mglXFreeContextEXT 
 | 
			
		||||
#define glXGetContextIDEXT mglXGetContextIDEXT 
 | 
			
		||||
#define glXGetCurrentDisplayEXT mglXGetCurrentDisplayEXT
 | 
			
		||||
#define glXImportContextEXT mglXImportContextEXT 
 | 
			
		||||
#define glXQueryContextInfoEXT mglXQueryContextInfoEXT
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * 215. GLX_MESA_copy_sub_buffer
 | 
			
		||||
 */
 | 
			
		||||
#define glXCopySubBufferMESA mglXCopySubBufferMESA
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * 216. GLX_MESA_pixmap_colormap
 | 
			
		||||
 */
 | 
			
		||||
#define glXCreateGLXPixmapMESA mglXCreateGLXPixmapMESA
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * 217. GLX_MESA_release_buffers
 | 
			
		||||
 */
 | 
			
		||||
#define glXReleaseBuffersMESA mglXReleaseBuffersMESA
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * 218. GLX_MESA_set_3dfx_mode
 | 
			
		||||
 */
 | 
			
		||||
#define glXSet3DfxModeMESA mglXSet3DfxModeMESA 
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * ARB 2. GLX_ARB_get_proc_address
 | 
			
		||||
 */
 | 
			
		||||
#define glXGetProcAddressARB mglXGetProcAddressARB
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 ** The following aren't in glxext.h yet.
 | 
			
		||||
 **/
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * ???. GLX_NV_vertex_array_range
 | 
			
		||||
 */
 | 
			
		||||
#define glXAllocateMemoryNV mglXAllocateMemoryNV 
 | 
			
		||||
#define glXFreeMemoryNV mglXFreeMemoryNV
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * ???. GLX_MESA_agp_offset
 | 
			
		||||
 */ 
 | 
			
		||||
#define glXGetAGPOffsetMESA mglXGetAGPOffsetMESA
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Other extensions implemented and in glxext.h
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#define glXSwapIntervalSGI mglXSwapIntervalSGI 
 | 
			
		||||
#define glXGetVideoSyncSGI mglXGetVideoSyncSGI
 | 
			
		||||
#define glXWaitVideoSyncSGI mglXWaitVideoSyncSGI
 | 
			
		||||
#define glXMakeCurrentReadSGI mglXMakeCurrentReadSGI
 | 
			
		||||
#define glXCushionSGI mglXCushionSGI
 | 
			
		||||
 | 
			
		||||
#define glXCreateGLXPixmapMESA mglXCreateGLXPixmapMESA
 | 
			
		||||
#define glXReleaseBuffersMESA mglXReleaseBuffersMESA
 | 
			
		||||
#define glXCopySubBufferMESA mglXCopySubBufferMESA
 | 
			
		||||
#define glXGetVideoSyncSGI mglXGetVideoSyncSGI
 | 
			
		||||
#define glXWaitVideoSyncSGI mglXWaitVideoSyncSGI
 | 
			
		||||
 | 
			
		||||
#define glXGetTransparentIndexSUN mglXGetTransparentIndexSUN
 | 
			
		||||
 | 
			
		||||
#define glXBindChannelToWindowSGIX mglXBindChannelToWindowSGIX
 | 
			
		||||
#define glXBindSwapBarrierSGIX mglXBindSwapBarrierSGIX
 | 
			
		||||
#define glXChannelRectSGIX mglXChannelRectSGIX 
 | 
			
		||||
#define glXChannelRectSyncSGIX mglXChannelRectSyncSGIX
 | 
			
		||||
#define glXChooseFBConfigSGIX mglXChooseFBConfigSGIX
 | 
			
		||||
#define glXCreateContextWithConfigSGIX mglXCreateContextWithConfigSGIX
 | 
			
		||||
#define glXCreateGLXPbufferSGIX mglXCreateGLXPbufferSGIX
 | 
			
		||||
#define glXCreateGLXPixmapWithConfigSGIX mglXCreateGLXPixmapWithConfigSGIX
 | 
			
		||||
#define glXDestroyGLXPbufferSGIX mglXDestroyGLXPbufferSGIX
 | 
			
		||||
#define glXGetCurrentReadDrawableSGI mglXGetCurrentReadDrawableSGI
 | 
			
		||||
#define glXGetFBConfigAttribSGIX mglXGetFBConfigAttribSGIX
 | 
			
		||||
#define glXGetFBConfigFromVisualSGIX mglXGetFBConfigFromVisualSGIX
 | 
			
		||||
#define glXGetSelectedEventSGIX mglXGetSelectedEventSGIX
 | 
			
		||||
#define glXGetVisualFromFBConfigSGIX mglXGetVisualFromFBConfigSGIX
 | 
			
		||||
#define glXJoinSwapGroupSGIX mglXJoinSwapGroupSGIX
 | 
			
		||||
#define glXQueryChannelDeltasSGIX mglXQueryChannelDeltasSGIX
 | 
			
		||||
#define glXQueryChannelRectSGIX mglXQueryChannelRectSGIX
 | 
			
		||||
#define glXQueryGLXPbufferSGIX mglXQueryGLXPbufferSGIX
 | 
			
		||||
#define glXQueryMaxSwapBarriersSGIX mglXQueryMaxSwapBarriersSGIX
 | 
			
		||||
#define glXSelectEventSGIX mglXSelectEventSGIX
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										607
									
								
								include/GL/glxext.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										607
									
								
								include/GL/glxext.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,607 @@
 | 
			
		||||
#ifndef __glxext_h_
 | 
			
		||||
#define __glxext_h_
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** License Applicability. Except to the extent portions of this file are
 | 
			
		||||
** made subject to an alternative license as permitted in the SGI Free
 | 
			
		||||
** Software License B, Version 1.1 (the "License"), the contents of this
 | 
			
		||||
** file are subject only to the provisions of the License. You may not use
 | 
			
		||||
** this file except in compliance with the License. You may obtain a copy
 | 
			
		||||
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
 | 
			
		||||
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
 | 
			
		||||
** 
 | 
			
		||||
** http://oss.sgi.com/projects/FreeB
 | 
			
		||||
** 
 | 
			
		||||
** Note that, as provided in the License, the Software is distributed on an
 | 
			
		||||
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
 | 
			
		||||
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
 | 
			
		||||
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
 | 
			
		||||
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
 | 
			
		||||
** 
 | 
			
		||||
** Original Code. The Original Code is: OpenGL Sample Implementation,
 | 
			
		||||
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
 | 
			
		||||
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
 | 
			
		||||
** Copyright in any portions created by third parties is as indicated
 | 
			
		||||
** elsewhere herein. All Rights Reserved.
 | 
			
		||||
** 
 | 
			
		||||
** Additional Notice Provisions: This software was created using the
 | 
			
		||||
** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
 | 
			
		||||
** not been independently verified as being compliant with the OpenGL(R)
 | 
			
		||||
** version 1.2.1 Specification.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
 | 
			
		||||
#define WIN32_LEAN_AND_MEAN 1
 | 
			
		||||
#include <windows.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef APIENTRY
 | 
			
		||||
#define APIENTRY
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef GLAPI
 | 
			
		||||
#define GLAPI extern
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/*************************************************************/
 | 
			
		||||
 | 
			
		||||
/* Header file version number, required by OpenGL ABI for Linux */
 | 
			
		||||
/* glxext.h last updated 2002/03/22 */
 | 
			
		||||
/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */
 | 
			
		||||
#define GLX_GLXEXT_VERSION 5
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_VERSION_1_3
 | 
			
		||||
#define GLX_WINDOW_BIT                     0x00000001
 | 
			
		||||
#define GLX_PIXMAP_BIT                     0x00000002
 | 
			
		||||
#define GLX_PBUFFER_BIT                    0x00000004
 | 
			
		||||
#define GLX_RGBA_BIT                       0x00000001
 | 
			
		||||
#define GLX_COLOR_INDEX_BIT                0x00000002
 | 
			
		||||
#define GLX_PBUFFER_CLOBBER_MASK           0x08000000
 | 
			
		||||
#define GLX_FRONT_LEFT_BUFFER_BIT          0x00000001
 | 
			
		||||
#define GLX_FRONT_RIGHT_BUFFER_BIT         0x00000002
 | 
			
		||||
#define GLX_BACK_LEFT_BUFFER_BIT           0x00000004
 | 
			
		||||
#define GLX_BACK_RIGHT_BUFFER_BIT          0x00000008
 | 
			
		||||
#define GLX_AUX_BUFFERS_BIT                0x00000010
 | 
			
		||||
#define GLX_DEPTH_BUFFER_BIT               0x00000020
 | 
			
		||||
#define GLX_STENCIL_BUFFER_BIT             0x00000040
 | 
			
		||||
#define GLX_ACCUM_BUFFER_BIT               0x00000080
 | 
			
		||||
#define GLX_CONFIG_CAVEAT                  0x20
 | 
			
		||||
#define GLX_X_VISUAL_TYPE                  0x22
 | 
			
		||||
#define GLX_TRANSPARENT_TYPE               0x23
 | 
			
		||||
#define GLX_TRANSPARENT_INDEX_VALUE        0x24
 | 
			
		||||
#define GLX_TRANSPARENT_RED_VALUE          0x25
 | 
			
		||||
#define GLX_TRANSPARENT_GREEN_VALUE        0x26
 | 
			
		||||
#define GLX_TRANSPARENT_BLUE_VALUE         0x27
 | 
			
		||||
#define GLX_TRANSPARENT_ALPHA_VALUE        0x28
 | 
			
		||||
#define GLX_DONT_CARE                      0xFFFFFFFF
 | 
			
		||||
#define GLX_NONE                           0x8000
 | 
			
		||||
#define GLX_SLOW_CONFIG                    0x8001
 | 
			
		||||
#define GLX_TRUE_COLOR                     0x8002
 | 
			
		||||
#define GLX_DIRECT_COLOR                   0x8003
 | 
			
		||||
#define GLX_PSEUDO_COLOR                   0x8004
 | 
			
		||||
#define GLX_STATIC_COLOR                   0x8005
 | 
			
		||||
#define GLX_GRAY_SCALE                     0x8006
 | 
			
		||||
#define GLX_STATIC_GRAY                    0x8007
 | 
			
		||||
#define GLX_TRANSPARENT_RGB                0x8008
 | 
			
		||||
#define GLX_TRANSPARENT_INDEX              0x8009
 | 
			
		||||
#define GLX_VISUAL_ID                      0x800B
 | 
			
		||||
#define GLX_SCREEN                         0x800C
 | 
			
		||||
#define GLX_NON_CONFORMANT_CONFIG          0x800D
 | 
			
		||||
#define GLX_DRAWABLE_TYPE                  0x8010
 | 
			
		||||
#define GLX_RENDER_TYPE                    0x8011
 | 
			
		||||
#define GLX_X_RENDERABLE                   0x8012
 | 
			
		||||
#define GLX_FBCONFIG_ID                    0x8013
 | 
			
		||||
#define GLX_RGBA_TYPE                      0x8014
 | 
			
		||||
#define GLX_COLOR_INDEX_TYPE               0x8015
 | 
			
		||||
#define GLX_MAX_PBUFFER_WIDTH              0x8016
 | 
			
		||||
#define GLX_MAX_PBUFFER_HEIGHT             0x8017
 | 
			
		||||
#define GLX_MAX_PBUFFER_PIXELS             0x8018
 | 
			
		||||
#define GLX_PRESERVED_CONTENTS             0x801B
 | 
			
		||||
#define GLX_LARGEST_PBUFFER                0x801C
 | 
			
		||||
#define GLX_WIDTH                          0x801D
 | 
			
		||||
#define GLX_HEIGHT                         0x801E
 | 
			
		||||
#define GLX_EVENT_MASK                     0x801F
 | 
			
		||||
#define GLX_DAMAGED                        0x8020
 | 
			
		||||
#define GLX_SAVED                          0x8021
 | 
			
		||||
#define GLX_WINDOW                         0x8022
 | 
			
		||||
#define GLX_PBUFFER                        0x8023
 | 
			
		||||
#define GLX_PBUFFER_HEIGHT                 0x8040
 | 
			
		||||
#define GLX_PBUFFER_WIDTH                  0x8041
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_VERSION_1_4
 | 
			
		||||
#define GLX_SAMPLE_BUFFERS                 100000
 | 
			
		||||
#define GLX_SAMPLES                        100001
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_ARB_get_proc_address
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_ARB_multisample
 | 
			
		||||
#define GLX_SAMPLE_BUFFERS_ARB             100000
 | 
			
		||||
#define GLX_SAMPLES_ARB                    100001
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIS_multisample
 | 
			
		||||
#define GLX_SAMPLE_BUFFERS_SGIS            100000
 | 
			
		||||
#define GLX_SAMPLES_SGIS                   100001
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_EXT_visual_info
 | 
			
		||||
#define GLX_X_VISUAL_TYPE_EXT              0x22
 | 
			
		||||
#define GLX_TRANSPARENT_TYPE_EXT           0x23
 | 
			
		||||
#define GLX_TRANSPARENT_INDEX_VALUE_EXT    0x24
 | 
			
		||||
#define GLX_TRANSPARENT_RED_VALUE_EXT      0x25
 | 
			
		||||
#define GLX_TRANSPARENT_GREEN_VALUE_EXT    0x26
 | 
			
		||||
#define GLX_TRANSPARENT_BLUE_VALUE_EXT     0x27
 | 
			
		||||
#define GLX_TRANSPARENT_ALPHA_VALUE_EXT    0x28
 | 
			
		||||
#define GLX_NONE_EXT                       0x8000
 | 
			
		||||
#define GLX_TRUE_COLOR_EXT                 0x8002
 | 
			
		||||
#define GLX_DIRECT_COLOR_EXT               0x8003
 | 
			
		||||
#define GLX_PSEUDO_COLOR_EXT               0x8004
 | 
			
		||||
#define GLX_STATIC_COLOR_EXT               0x8005
 | 
			
		||||
#define GLX_GRAY_SCALE_EXT                 0x8006
 | 
			
		||||
#define GLX_STATIC_GRAY_EXT                0x8007
 | 
			
		||||
#define GLX_TRANSPARENT_RGB_EXT            0x8008
 | 
			
		||||
#define GLX_TRANSPARENT_INDEX_EXT          0x8009
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGI_swap_control
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGI_video_sync
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGI_make_current_read
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_video_source
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_EXT_visual_rating
 | 
			
		||||
#define GLX_VISUAL_CAVEAT_EXT              0x20
 | 
			
		||||
#define GLX_SLOW_VISUAL_EXT                0x8001
 | 
			
		||||
#define GLX_NON_CONFORMANT_VISUAL_EXT      0x800D
 | 
			
		||||
/* reuse GLX_NONE_EXT */
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_EXT_import_context
 | 
			
		||||
#define GLX_SHARE_CONTEXT_EXT              0x800A
 | 
			
		||||
#define GLX_VISUAL_ID_EXT                  0x800B
 | 
			
		||||
#define GLX_SCREEN_EXT                     0x800C
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_fbconfig
 | 
			
		||||
#define GLX_WINDOW_BIT_SGIX                0x00000001
 | 
			
		||||
#define GLX_PIXMAP_BIT_SGIX                0x00000002
 | 
			
		||||
#define GLX_RGBA_BIT_SGIX                  0x00000001
 | 
			
		||||
#define GLX_COLOR_INDEX_BIT_SGIX           0x00000002
 | 
			
		||||
#define GLX_DRAWABLE_TYPE_SGIX             0x8010
 | 
			
		||||
#define GLX_RENDER_TYPE_SGIX               0x8011
 | 
			
		||||
#define GLX_X_RENDERABLE_SGIX              0x8012
 | 
			
		||||
#define GLX_FBCONFIG_ID_SGIX               0x8013
 | 
			
		||||
#define GLX_RGBA_TYPE_SGIX                 0x8014
 | 
			
		||||
#define GLX_COLOR_INDEX_TYPE_SGIX          0x8015
 | 
			
		||||
/* reuse GLX_SCREEN_EXT */
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_pbuffer
 | 
			
		||||
#define GLX_PBUFFER_BIT_SGIX               0x00000004
 | 
			
		||||
#define GLX_BUFFER_CLOBBER_MASK_SGIX       0x08000000
 | 
			
		||||
#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX     0x00000001
 | 
			
		||||
#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX    0x00000002
 | 
			
		||||
#define GLX_BACK_LEFT_BUFFER_BIT_SGIX      0x00000004
 | 
			
		||||
#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX     0x00000008
 | 
			
		||||
#define GLX_AUX_BUFFERS_BIT_SGIX           0x00000010
 | 
			
		||||
#define GLX_DEPTH_BUFFER_BIT_SGIX          0x00000020
 | 
			
		||||
#define GLX_STENCIL_BUFFER_BIT_SGIX        0x00000040
 | 
			
		||||
#define GLX_ACCUM_BUFFER_BIT_SGIX          0x00000080
 | 
			
		||||
#define GLX_SAMPLE_BUFFERS_BIT_SGIX        0x00000100
 | 
			
		||||
#define GLX_MAX_PBUFFER_WIDTH_SGIX         0x8016
 | 
			
		||||
#define GLX_MAX_PBUFFER_HEIGHT_SGIX        0x8017
 | 
			
		||||
#define GLX_MAX_PBUFFER_PIXELS_SGIX        0x8018
 | 
			
		||||
#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX     0x8019
 | 
			
		||||
#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX    0x801A
 | 
			
		||||
#define GLX_PRESERVED_CONTENTS_SGIX        0x801B
 | 
			
		||||
#define GLX_LARGEST_PBUFFER_SGIX           0x801C
 | 
			
		||||
#define GLX_WIDTH_SGIX                     0x801D
 | 
			
		||||
#define GLX_HEIGHT_SGIX                    0x801E
 | 
			
		||||
#define GLX_EVENT_MASK_SGIX                0x801F
 | 
			
		||||
#define GLX_DAMAGED_SGIX                   0x8020
 | 
			
		||||
#define GLX_SAVED_SGIX                     0x8021
 | 
			
		||||
#define GLX_WINDOW_SGIX                    0x8022
 | 
			
		||||
#define GLX_PBUFFER_SGIX                   0x8023
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGI_cushion
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_video_resize
 | 
			
		||||
#define GLX_SYNC_FRAME_SGIX                0x00000000
 | 
			
		||||
#define GLX_SYNC_SWAP_SGIX                 0x00000001
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_dmbuffer
 | 
			
		||||
#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX     0x8024
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_swap_group
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_swap_barrier
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIS_blended_overlay
 | 
			
		||||
#define GLX_BLENDED_RGBA_SGIS              0x8025
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIS_shared_multisample
 | 
			
		||||
#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
 | 
			
		||||
#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SUN_get_transparent_index
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_3DFX_multisample
 | 
			
		||||
#define GLX_SAMPLE_BUFFERS_3DFX            0x8050
 | 
			
		||||
#define GLX_SAMPLES_3DFX                   0x8051
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_MESA_copy_sub_buffer
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_MESA_pixmap_colormap
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_MESA_release_buffers
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_MESA_set_3dfx_mode
 | 
			
		||||
#define GLX_3DFX_WINDOW_MODE_MESA          0x1
 | 
			
		||||
#define GLX_3DFX_FULLSCREEN_MODE_MESA      0x2
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_visual_select_group
 | 
			
		||||
#define GLX_VISUAL_SELECT_GROUP_SGIX       0x8028
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_OML_swap_method
 | 
			
		||||
#define GLX_SWAP_METHOD_OML                0x8060
 | 
			
		||||
#define GLX_SWAP_EXCHANGE_OML              0x8061
 | 
			
		||||
#define GLX_SWAP_COPY_OML                  0x8062
 | 
			
		||||
#define GLX_SWAP_UNDEFINED_OML             0x8063
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_OML_sync_control
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*************************************************************/
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_ARB_get_proc_address
 | 
			
		||||
typedef void (*__GLXextFuncPtr)(void);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_video_source
 | 
			
		||||
typedef XID GLXVideoSourceSGIX;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_fbconfig
 | 
			
		||||
typedef XID GLXFBConfigIDSGIX;
 | 
			
		||||
typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_pbuffer
 | 
			
		||||
typedef XID GLXPbufferSGIX;
 | 
			
		||||
typedef struct {
 | 
			
		||||
    int type;
 | 
			
		||||
    unsigned long serial;	  /* # of last request processed by server */
 | 
			
		||||
    Bool send_event;		  /* true if this came for SendEvent request */
 | 
			
		||||
    Display *display;		  /* display the event was read from */
 | 
			
		||||
    GLXDrawable drawable;	  /* i.d. of Drawable */
 | 
			
		||||
    int event_type;		  /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */
 | 
			
		||||
    int draw_type;		  /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */
 | 
			
		||||
    unsigned int mask;	  /* mask indicating which buffers are affected*/
 | 
			
		||||
    int x, y;
 | 
			
		||||
    int width, height;
 | 
			
		||||
    int count;		  /* if nonzero, at least this many more */
 | 
			
		||||
} GLXBufferClobberEventSGIX;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_VERSION_1_3
 | 
			
		||||
#define GLX_VERSION_1_3 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *);
 | 
			
		||||
extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *);
 | 
			
		||||
extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *);
 | 
			
		||||
extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig);
 | 
			
		||||
extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *);
 | 
			
		||||
extern void glXDestroyWindow (Display *, GLXWindow);
 | 
			
		||||
extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *);
 | 
			
		||||
extern void glXDestroyPixmap (Display *, GLXPixmap);
 | 
			
		||||
extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *);
 | 
			
		||||
extern void glXDestroyPbuffer (Display *, GLXPbuffer);
 | 
			
		||||
extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *);
 | 
			
		||||
extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool);
 | 
			
		||||
extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext);
 | 
			
		||||
extern GLXDrawable glXGetCurrentReadDrawable (void);
 | 
			
		||||
extern Display * glXGetCurrentDisplay (void);
 | 
			
		||||
extern int glXQueryContext (Display *, GLXContext, int, int *);
 | 
			
		||||
extern void glXSelectEvent (Display *, GLXDrawable, unsigned long);
 | 
			
		||||
extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
 | 
			
		||||
typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
 | 
			
		||||
typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
 | 
			
		||||
typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
 | 
			
		||||
typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
 | 
			
		||||
typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
 | 
			
		||||
typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
 | 
			
		||||
typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
 | 
			
		||||
typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
 | 
			
		||||
typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
 | 
			
		||||
typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
 | 
			
		||||
typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
 | 
			
		||||
typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
 | 
			
		||||
typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
 | 
			
		||||
typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
 | 
			
		||||
typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
 | 
			
		||||
typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
 | 
			
		||||
typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_VERSION_1_4
 | 
			
		||||
#define GLX_VERSION_1_4 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_ARB_get_proc_address
 | 
			
		||||
#define GLX_ARB_get_proc_address 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_ARB_multisample
 | 
			
		||||
#define GLX_ARB_multisample 1
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIS_multisample
 | 
			
		||||
#define GLX_SGIS_multisample 1
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_EXT_visual_info
 | 
			
		||||
#define GLX_EXT_visual_info 1
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGI_swap_control
 | 
			
		||||
#define GLX_SGI_swap_control 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern int glXSwapIntervalSGI (int);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGI_video_sync
 | 
			
		||||
#define GLX_SGI_video_sync 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern int glXGetVideoSyncSGI (unsigned int *);
 | 
			
		||||
extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
 | 
			
		||||
typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGI_make_current_read
 | 
			
		||||
#define GLX_SGI_make_current_read 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext);
 | 
			
		||||
extern GLXDrawable glXGetCurrentReadDrawableSGI (void);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
 | 
			
		||||
typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef _VL_H
 | 
			
		||||
#ifndef GLX_SGIX_video_source
 | 
			
		||||
#define GLX_SGIX_video_source 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode);
 | 
			
		||||
extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
 | 
			
		||||
typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif /* _VL_H */
 | 
			
		||||
#ifndef GLX_EXT_visual_rating
 | 
			
		||||
#define GLX_EXT_visual_rating 1
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_EXT_import_context
 | 
			
		||||
#define GLX_EXT_import_context 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern Display * glXGetCurrentDisplayEXT (void);
 | 
			
		||||
extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *);
 | 
			
		||||
extern GLXContextID glXGetContextIDEXT (const GLXContext);
 | 
			
		||||
extern GLXContext glXImportContextEXT (Display *, GLXContextID);
 | 
			
		||||
extern void glXFreeContextEXT (Display *, GLXContext);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
 | 
			
		||||
typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
 | 
			
		||||
typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
 | 
			
		||||
typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
 | 
			
		||||
typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_fbconfig
 | 
			
		||||
#define GLX_SGIX_fbconfig 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *);
 | 
			
		||||
extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *);
 | 
			
		||||
extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap);
 | 
			
		||||
extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool);
 | 
			
		||||
extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX);
 | 
			
		||||
extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
 | 
			
		||||
typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
 | 
			
		||||
typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
 | 
			
		||||
typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
 | 
			
		||||
typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
 | 
			
		||||
typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_pbuffer
 | 
			
		||||
#define GLX_SGIX_pbuffer 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *);
 | 
			
		||||
extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX);
 | 
			
		||||
extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *);
 | 
			
		||||
extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long);
 | 
			
		||||
extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
 | 
			
		||||
typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
 | 
			
		||||
typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
 | 
			
		||||
typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
 | 
			
		||||
typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGI_cushion
 | 
			
		||||
#define GLX_SGI_cushion 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern void glXCushionSGI (Display *, Window, float);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_video_resize
 | 
			
		||||
#define GLX_SGIX_video_resize 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern int glXBindChannelToWindowSGIX (Display *, int, int, Window);
 | 
			
		||||
extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int);
 | 
			
		||||
extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *);
 | 
			
		||||
extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *);
 | 
			
		||||
extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
 | 
			
		||||
typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
 | 
			
		||||
typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
 | 
			
		||||
typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
 | 
			
		||||
typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef _DM_BUFFER_H_
 | 
			
		||||
#ifndef GLX_SGIX_dmbuffer
 | 
			
		||||
#define GLX_SGIX_dmbuffer 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif /* _DM_BUFFER_H_ */
 | 
			
		||||
#ifndef GLX_SGIX_swap_group
 | 
			
		||||
#define GLX_SGIX_swap_group 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_swap_barrier
 | 
			
		||||
#define GLX_SGIX_swap_barrier 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int);
 | 
			
		||||
extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
 | 
			
		||||
typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SUN_get_transparent_index
 | 
			
		||||
#define GLX_SUN_get_transparent_index 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_MESA_copy_sub_buffer
 | 
			
		||||
#define GLX_MESA_copy_sub_buffer 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_MESA_pixmap_colormap
 | 
			
		||||
#define GLX_MESA_pixmap_colormap 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_MESA_release_buffers
 | 
			
		||||
#define GLX_MESA_release_buffers 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_MESA_set_3dfx_mode
 | 
			
		||||
#define GLX_MESA_set_3dfx_mode 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern Bool glXSet3DfxModeMESA (int);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_visual_select_group
 | 
			
		||||
#define GLX_SGIX_visual_select_group 1
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_OML_swap_method
 | 
			
		||||
#define GLX_OML_swap_method 1
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(__STDC_VERSION__)
 | 
			
		||||
#if __STDC_VERSION__ >= 199901L
 | 
			
		||||
/* Include ISO C99 integer types for OML_sync_control; need a better test */
 | 
			
		||||
#include <inttypes.h>
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_OML_sync_control
 | 
			
		||||
#define GLX_OML_sync_control 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern Bool glXGetSyncValuesOML (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *);
 | 
			
		||||
extern Bool glXGetMscRateOML (Display *, GLXDrawable, int32_t *, int32_t *);
 | 
			
		||||
extern int64_t glXSwapBuffersMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t);
 | 
			
		||||
extern Bool glXWaitForMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *);
 | 
			
		||||
extern Bool glXWaitForSbcOML (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
 | 
			
		||||
typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
 | 
			
		||||
typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
 | 
			
		||||
typedef Bool ( * PFNGLXWAITFORMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc);
 | 
			
		||||
typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif /* C99 version test */
 | 
			
		||||
#endif /* STDC test */
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
							
								
								
									
										424
									
								
								include/GL/internal/glcore-new.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										424
									
								
								include/GL/internal/glcore-new.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,424 @@
 | 
			
		||||
#ifndef __gl_core_h_
 | 
			
		||||
#define __gl_core_h_
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** License Applicability. Except to the extent portions of this file are
 | 
			
		||||
** made subject to an alternative license as permitted in the SGI Free
 | 
			
		||||
** Software License B, Version 1.1 (the "License"), the contents of this
 | 
			
		||||
** file are subject only to the provisions of the License. You may not use
 | 
			
		||||
** this file except in compliance with the License. You may obtain a copy
 | 
			
		||||
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
 | 
			
		||||
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
 | 
			
		||||
** 
 | 
			
		||||
** http://oss.sgi.com/projects/FreeB
 | 
			
		||||
** 
 | 
			
		||||
** Note that, as provided in the License, the Software is distributed on an
 | 
			
		||||
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
 | 
			
		||||
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
 | 
			
		||||
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
 | 
			
		||||
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
 | 
			
		||||
** 
 | 
			
		||||
** Original Code. The Original Code is: OpenGL Sample Implementation,
 | 
			
		||||
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
 | 
			
		||||
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
 | 
			
		||||
** Copyright in any portions created by third parties is as indicated
 | 
			
		||||
** elsewhere herein. All Rights Reserved.
 | 
			
		||||
** 
 | 
			
		||||
** Additional Notice Provisions: The application programming interfaces
 | 
			
		||||
** established by SGI in conjunction with the Original Code are The
 | 
			
		||||
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
 | 
			
		||||
** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
 | 
			
		||||
** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
 | 
			
		||||
** Window System(R) (Version 1.3), released October 19, 1998. This software
 | 
			
		||||
** was created using the OpenGL(R) version 1.2.1 Sample Implementation
 | 
			
		||||
** published by SGI, but has not been independently verified as being
 | 
			
		||||
** compliant with the OpenGL(R) version 1.2.1 Specification.
 | 
			
		||||
**
 | 
			
		||||
** $Date: 2001/01/08 03:56:53 $ $Revision: 1.1 $
 | 
			
		||||
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/include/GL/internal/Attic/glcore-new.h,v 1.1 2001/01/08 03:56:53 keithw Exp $
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifdef XFree86LOADER
 | 
			
		||||
#include "xf86_ansic.h"
 | 
			
		||||
#else
 | 
			
		||||
#include <sys/types.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
typedef struct __GLcontextRec __GLcontext;
 | 
			
		||||
typedef struct __GLinterfaceRec __GLinterface;
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** This file defines the interface between the GL core and the surrounding
 | 
			
		||||
** "operating system" that supports it (currently the GLX or WGL extensions).
 | 
			
		||||
**
 | 
			
		||||
** Members (data and function pointers) are documented as imported or
 | 
			
		||||
** exported according to how they are used by the core rendering functions.
 | 
			
		||||
** Imported members are initialized by the "operating system" and used by
 | 
			
		||||
** the core functions.  Exported members are initialized by the core functions
 | 
			
		||||
** and used by the "operating system".
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Mode and limit information for a context.  This information is
 | 
			
		||||
** kept around in the context so that values can be used during
 | 
			
		||||
** command execution, and for returning information about the
 | 
			
		||||
** context to the application.
 | 
			
		||||
*/
 | 
			
		||||
typedef struct __GLcontextModesRec {
 | 
			
		||||
    GLboolean rgbMode;
 | 
			
		||||
    GLboolean colorIndexMode;
 | 
			
		||||
    GLboolean doubleBufferMode;
 | 
			
		||||
    GLboolean stereoMode;
 | 
			
		||||
 | 
			
		||||
    GLboolean haveAccumBuffer;
 | 
			
		||||
    GLboolean haveDepthBuffer;
 | 
			
		||||
    GLboolean haveStencilBuffer;
 | 
			
		||||
 | 
			
		||||
    GLint redBits, greenBits, blueBits, alphaBits;	/* bits per comp */
 | 
			
		||||
    GLuint redMask, greenMask, blueMask, alphaMask;
 | 
			
		||||
    GLint rgbBits;		/* total bits for rgb */
 | 
			
		||||
    GLint indexBits;		/* total bits for colorindex */
 | 
			
		||||
 | 
			
		||||
    GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
 | 
			
		||||
    GLint depthBits;
 | 
			
		||||
    GLint stencilBits;
 | 
			
		||||
 | 
			
		||||
    GLint numAuxBuffers;
 | 
			
		||||
 | 
			
		||||
    GLint level;
 | 
			
		||||
 | 
			
		||||
    GLint pixmapMode;
 | 
			
		||||
} __GLcontextModes;
 | 
			
		||||
 | 
			
		||||
/************************************************************************/
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Structure used for allocating and freeing drawable private memory.
 | 
			
		||||
** (like software buffers, for example).
 | 
			
		||||
**
 | 
			
		||||
** The memory allocation routines are provided by the surrounding
 | 
			
		||||
** "operating system" code, and they are to be used for allocating
 | 
			
		||||
** software buffers and things which are associated with the drawable,
 | 
			
		||||
** and used by any context which draws to that drawable.  There are
 | 
			
		||||
** separate memory allocation functions for drawables and contexts
 | 
			
		||||
** since drawables and contexts can be created and destroyed independently
 | 
			
		||||
** of one another, and the "operating system" may want to use separate
 | 
			
		||||
** allocation arenas for each.
 | 
			
		||||
**
 | 
			
		||||
** The freePrivate function is filled in by the core routines when they
 | 
			
		||||
** allocates software buffers, and stick them in "private".  The freePrivate
 | 
			
		||||
** function will destroy anything allocated to this drawable (to be called
 | 
			
		||||
** when the drawable is destroyed).
 | 
			
		||||
*/
 | 
			
		||||
typedef struct __GLdrawableRegionRec __GLdrawableRegion;
 | 
			
		||||
typedef struct __GLdrawableBufferRec __GLdrawableBuffer;
 | 
			
		||||
typedef struct __GLdrawablePrivateRec __GLdrawablePrivate;
 | 
			
		||||
 | 
			
		||||
typedef struct __GLregionRectRec {
 | 
			
		||||
    /* lower left (inside the rectangle) */
 | 
			
		||||
    GLint x0, y0;
 | 
			
		||||
    /* upper right (outside the rectangle) */
 | 
			
		||||
    GLint x1, y1;
 | 
			
		||||
} __GLregionRect;
 | 
			
		||||
 | 
			
		||||
struct __GLdrawableRegionRec {
 | 
			
		||||
    GLint numRects;
 | 
			
		||||
    __GLregionRect *rects;
 | 
			
		||||
    __GLregionRect boundingRect;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/************************************************************************/
 | 
			
		||||
 | 
			
		||||
/* masks for the buffers */
 | 
			
		||||
#define __GL_FRONT_BUFFER_MASK		0x00000001
 | 
			
		||||
#define	__GL_FRONT_LEFT_BUFFER_MASK	0x00000001
 | 
			
		||||
#define	__GL_FRONT_RIGHT_BUFFER_MASK	0x00000002
 | 
			
		||||
#define	__GL_BACK_BUFFER_MASK		0x00000004
 | 
			
		||||
#define __GL_BACK_LEFT_BUFFER_MASK	0x00000004
 | 
			
		||||
#define __GL_BACK_RIGHT_BUFFER_MASK	0x00000008
 | 
			
		||||
#define	__GL_ACCUM_BUFFER_MASK		0x00000010
 | 
			
		||||
#define	__GL_DEPTH_BUFFER_MASK		0x00000020
 | 
			
		||||
#define	__GL_STENCIL_BUFFER_MASK	0x00000040
 | 
			
		||||
#define	__GL_AUX_BUFFER_MASK(i)		(0x0000080 << (i))
 | 
			
		||||
 | 
			
		||||
#define __GL_ALL_BUFFER_MASK		0xffffffff
 | 
			
		||||
 | 
			
		||||
/* what Resize routines return if resize resorted to fallback case */
 | 
			
		||||
#define __GL_BUFFER_FALLBACK	0x10
 | 
			
		||||
 | 
			
		||||
typedef void (*__GLbufFallbackInitFn)(__GLdrawableBuffer *buf, 
 | 
			
		||||
				      __GLdrawablePrivate *glPriv, GLint bits);
 | 
			
		||||
typedef void (*__GLbufMainInitFn)(__GLdrawableBuffer *buf, 
 | 
			
		||||
				  __GLdrawablePrivate *glPriv, GLint bits,
 | 
			
		||||
				  __GLbufFallbackInitFn back);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** A drawable buffer
 | 
			
		||||
**
 | 
			
		||||
** This data structure describes the context side of a drawable.  
 | 
			
		||||
**
 | 
			
		||||
** According to the spec there could be multiple contexts bound to the same
 | 
			
		||||
** drawable at the same time (from different threads).  In order to avoid
 | 
			
		||||
** multiple-access conflicts, locks are used to serialize access.  When a
 | 
			
		||||
** thread needs to access (read or write) a member of the drawable, it takes
 | 
			
		||||
** a lock first.  Some of the entries in the drawable are treated "mostly
 | 
			
		||||
** constant", so we take the freedom of allowing access to them without
 | 
			
		||||
** taking a lock (for optimization reasons).
 | 
			
		||||
**
 | 
			
		||||
** For more details regarding locking, see buffers.h in the GL core
 | 
			
		||||
*/
 | 
			
		||||
struct __GLdrawableBufferRec {
 | 
			
		||||
    /*
 | 
			
		||||
    ** Buffer dimensions
 | 
			
		||||
    */
 | 
			
		||||
    GLint width, height, depth;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Framebuffer base address
 | 
			
		||||
    */
 | 
			
		||||
    void *base;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Framebuffer size (in bytes)
 | 
			
		||||
    */
 | 
			
		||||
    GLuint size;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Size (in bytes) of each element in the framebuffer
 | 
			
		||||
    */
 | 
			
		||||
    GLuint elementSize;
 | 
			
		||||
    GLuint elementSizeLog2;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Element skip from one scanline to the next.
 | 
			
		||||
    ** If the buffer is part of another buffer (for example, fullscreen
 | 
			
		||||
    ** front buffer), outerWidth is the width of that buffer.
 | 
			
		||||
    */
 | 
			
		||||
    GLint outerWidth;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** outerWidth * elementSize
 | 
			
		||||
    */
 | 
			
		||||
    GLint byteWidth;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Allocation/deallocation is done based on this handle.  A handle
 | 
			
		||||
    ** is conceptually different from the framebuffer 'base'.
 | 
			
		||||
    */
 | 
			
		||||
    void *handle;
 | 
			
		||||
 | 
			
		||||
    /* imported */
 | 
			
		||||
    GLboolean (*resize)(__GLdrawableBuffer *buf,
 | 
			
		||||
			GLint x, GLint y, GLuint width, GLuint height, 
 | 
			
		||||
			__GLdrawablePrivate *glPriv, GLuint bufferMask);
 | 
			
		||||
    void (*lock)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
 | 
			
		||||
    void (*unlock)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
 | 
			
		||||
    void (*fill)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv,
 | 
			
		||||
    		GLuint val, GLint x, GLint y, GLint w, GLint h);
 | 
			
		||||
    void (*free)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
 | 
			
		||||
 | 
			
		||||
    /* exported */
 | 
			
		||||
    void (*freePrivate)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
    void *privatePtr;
 | 
			
		||||
#else
 | 
			
		||||
    void *private;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    /* private */
 | 
			
		||||
    void *other;	/* implementation private data */
 | 
			
		||||
    __GLbufMainInitFn mainInit;
 | 
			
		||||
    __GLbufFallbackInitFn fallbackInit;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** The context side of the drawable private
 | 
			
		||||
*/
 | 
			
		||||
struct __GLdrawablePrivateRec {
 | 
			
		||||
    /*
 | 
			
		||||
    ** Drawable Modes
 | 
			
		||||
    */
 | 
			
		||||
    __GLcontextModes *modes;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Drawable size
 | 
			
		||||
    */
 | 
			
		||||
    GLuint width, height;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Origin in screen coordinates of the drawable
 | 
			
		||||
    */
 | 
			
		||||
    GLint xOrigin, yOrigin;
 | 
			
		||||
#ifdef __GL_ALIGNED_BUFFERS
 | 
			
		||||
    /*
 | 
			
		||||
    ** Drawable offset from screen origin
 | 
			
		||||
    */
 | 
			
		||||
    GLint xOffset, yOffset;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Alignment restriction
 | 
			
		||||
    */
 | 
			
		||||
    GLint xAlignment, yAlignment;
 | 
			
		||||
#endif
 | 
			
		||||
    /*
 | 
			
		||||
    ** Should we invert the y axis?
 | 
			
		||||
    */
 | 
			
		||||
    GLint yInverted;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Mask specifying which buffers are renderable by the hw
 | 
			
		||||
    */
 | 
			
		||||
    GLuint accelBufferMask;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** the buffers themselves
 | 
			
		||||
    */
 | 
			
		||||
    __GLdrawableBuffer frontBuffer;
 | 
			
		||||
    __GLdrawableBuffer backBuffer;
 | 
			
		||||
    __GLdrawableBuffer accumBuffer;
 | 
			
		||||
    __GLdrawableBuffer depthBuffer;
 | 
			
		||||
    __GLdrawableBuffer stencilBuffer;
 | 
			
		||||
#if __GL_NUMBER_OF_AUX_BUFFERS > 0
 | 
			
		||||
    __GLdrawableBuffer *auxBuffer;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    __GLdrawableRegion ownershipRegion;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Lock for the drawable private structure
 | 
			
		||||
    */
 | 
			
		||||
    void *lock;
 | 
			
		||||
#ifdef DEBUG
 | 
			
		||||
    /* lock debugging info */
 | 
			
		||||
    int lockRefCount;
 | 
			
		||||
    int lockLine[10];
 | 
			
		||||
    char *lockFile[10];
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    /* imported */
 | 
			
		||||
    void *(*malloc)(size_t size);
 | 
			
		||||
    void *(*calloc)(size_t numElem, size_t elemSize);
 | 
			
		||||
    void *(*realloc)(void *oldAddr, size_t newSize);
 | 
			
		||||
    void (*free)(void *addr);
 | 
			
		||||
 | 
			
		||||
    GLboolean (*addSwapRect)(__GLdrawablePrivate *glPriv, 
 | 
			
		||||
			     GLint x, GLint y, GLsizei width, GLsizei height);
 | 
			
		||||
    void (*setClipRect)(__GLdrawablePrivate *glPriv, 
 | 
			
		||||
			GLint x, GLint y, GLsizei width, GLsizei height);
 | 
			
		||||
    void (*updateClipRegion)(__GLdrawablePrivate *glPriv);
 | 
			
		||||
    GLboolean (*resize)(__GLdrawablePrivate *glPriv);
 | 
			
		||||
    void (*getDrawableSize)(__GLdrawablePrivate *glPriv, 
 | 
			
		||||
			    GLint *x, GLint *y, GLuint *width, GLuint *height);
 | 
			
		||||
 | 
			
		||||
    void (*lockDP)(__GLdrawablePrivate *glPriv, __GLcontext *gc);
 | 
			
		||||
    void (*unlockDP)(__GLdrawablePrivate *glPriv);
 | 
			
		||||
 | 
			
		||||
    /* exported */
 | 
			
		||||
    void *wsPriv;	/* pointer to the window system DrawablePrivate */
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
    void *privatePtr;
 | 
			
		||||
#else
 | 
			
		||||
    void *private;
 | 
			
		||||
#endif
 | 
			
		||||
    void (*freePrivate)(__GLdrawablePrivate *);
 | 
			
		||||
 | 
			
		||||
    /* client data */
 | 
			
		||||
    void *other;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Macros to lock/unlock the drawable private
 | 
			
		||||
*/
 | 
			
		||||
#if defined(DEBUG)
 | 
			
		||||
#define __GL_LOCK_DP(glPriv,gc) \
 | 
			
		||||
    (*(glPriv)->lockDP)(glPriv,gc); \
 | 
			
		||||
    (glPriv)->lockLine[(glPriv)->lockRefCount] = __LINE__; \
 | 
			
		||||
    (glPriv)->lockFile[(glPriv)->lockRefCount] = __FILE__; \
 | 
			
		||||
    (glPriv)->lockRefCount++
 | 
			
		||||
#define __GL_UNLOCK_DP(glPriv) \
 | 
			
		||||
    (glPriv)->lockRefCount--; \
 | 
			
		||||
    (glPriv)->lockLine[(glPriv)->lockRefCount] = 0; \
 | 
			
		||||
    (glPriv)->lockFile[(glPriv)->lockRefCount] = NULL; \
 | 
			
		||||
    (*(glPriv)->unlockDP)(glPriv)
 | 
			
		||||
#else /* DEBUG */
 | 
			
		||||
#define __GL_LOCK_DP(glPriv,gc)		(*(glPriv)->lockDP)(glPriv,gc)
 | 
			
		||||
#define	__GL_UNLOCK_DP(glPriv)		(*(glPriv)->unlockDP)(glPriv)
 | 
			
		||||
#endif /* DEBUG */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Procedures which are imported by the GL from the surrounding
 | 
			
		||||
** "operating system".  Math functions are not considered part of the
 | 
			
		||||
** "operating system".
 | 
			
		||||
*/
 | 
			
		||||
typedef struct __GLimportsRec {
 | 
			
		||||
    /* Memory management */
 | 
			
		||||
    void * (*malloc)(__GLcontext *gc, size_t size);
 | 
			
		||||
    void *(*calloc)(__GLcontext *gc, size_t numElem, size_t elemSize);
 | 
			
		||||
    void *(*realloc)(__GLcontext *gc, void *oldAddr, size_t newSize);
 | 
			
		||||
    void (*free)(__GLcontext *gc, void *addr);
 | 
			
		||||
 | 
			
		||||
    /* Error handling */
 | 
			
		||||
    void (*warning)(__GLcontext *gc, char *fmt);
 | 
			
		||||
    void (*fatal)(__GLcontext *gc, char *fmt);
 | 
			
		||||
 | 
			
		||||
    /* other system calls */
 | 
			
		||||
    char *(CAPI *getenv)(__GLcontext *gc, const char *var);
 | 
			
		||||
    int (CAPI *atoi)(__GLcontext *gc, const char *str);
 | 
			
		||||
    int (CAPI *sprintf)(__GLcontext *gc, char *str, const char *fmt, ...);
 | 
			
		||||
    void *(CAPI *fopen)(__GLcontext *gc, const char *path, const char *mode);
 | 
			
		||||
    int (CAPI *fclose)(__GLcontext *gc, void *stream);
 | 
			
		||||
    int (CAPI *fprintf)(__GLcontext *gc, void *stream, const char *fmt, ...);
 | 
			
		||||
 | 
			
		||||
    /* Drawing surface management */
 | 
			
		||||
    __GLdrawablePrivate *(*getDrawablePrivate)(__GLcontext *gc);
 | 
			
		||||
 | 
			
		||||
    /* Pointer to the window system context */
 | 
			
		||||
    void *wscx;
 | 
			
		||||
 | 
			
		||||
    /* Operating system dependent data goes here */
 | 
			
		||||
    void *other;
 | 
			
		||||
} __GLimports;
 | 
			
		||||
 | 
			
		||||
/************************************************************************/
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Procedures which are exported by the GL to the surrounding "operating
 | 
			
		||||
** system" so that it can manage multiple GL context's.
 | 
			
		||||
*/
 | 
			
		||||
typedef struct __GLexportsRec {
 | 
			
		||||
    /* Context management (return GL_FALSE on failure) */
 | 
			
		||||
    GLboolean (*destroyContext)(__GLcontext *gc);
 | 
			
		||||
    GLboolean (*loseCurrent)(__GLcontext *gc);
 | 
			
		||||
    GLboolean (*makeCurrent)(__GLcontext *gc);
 | 
			
		||||
    GLboolean (*shareContext)(__GLcontext *gc, __GLcontext *gcShare);
 | 
			
		||||
    GLboolean (*copyContext)(__GLcontext *dst, const __GLcontext *src, GLuint mask);
 | 
			
		||||
    GLboolean (*forceCurrent)(__GLcontext *gc);
 | 
			
		||||
 | 
			
		||||
    /* Drawing surface notification callbacks */
 | 
			
		||||
    GLboolean (*notifyResize)(__GLcontext *gc);
 | 
			
		||||
    void (*notifyDestroy)(__GLcontext *gc);
 | 
			
		||||
    void (*notifySwapBuffers)(__GLcontext *gc);
 | 
			
		||||
 | 
			
		||||
    /* Dispatch table override control for external agents like libGLS */
 | 
			
		||||
    struct __GLdispatchStateRec* (*dispatchExec)(__GLcontext *gc);
 | 
			
		||||
    void (*beginDispatchOverride)(__GLcontext *gc);
 | 
			
		||||
    void (*endDispatchOverride)(__GLcontext *gc);
 | 
			
		||||
} __GLexports;
 | 
			
		||||
 | 
			
		||||
/************************************************************************/
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** This must be the first member of a __GLcontext structure.  This is the
 | 
			
		||||
** only part of a context that is exposed to the outside world; everything
 | 
			
		||||
** else is opaque.
 | 
			
		||||
*/
 | 
			
		||||
struct __GLinterfaceRec {
 | 
			
		||||
    __GLimports imports;
 | 
			
		||||
    __GLexports exports;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern __GLcontext *__glCoreCreateContext(__GLimports *, __GLcontextModes *);
 | 
			
		||||
extern void __glCoreNopDispatch(void);
 | 
			
		||||
 | 
			
		||||
#endif /* __gl_core_h_ */
 | 
			
		||||
							
								
								
									
										424
									
								
								include/GL/internal/glcore.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										424
									
								
								include/GL/internal/glcore.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,424 @@
 | 
			
		||||
/* $XFree86: xc/lib/GL/include/GL/internal/glcore.h,v 1.7 2001/03/25 05:32:00 tsi Exp $ */
 | 
			
		||||
#ifndef __gl_core_h_
 | 
			
		||||
#define __gl_core_h_
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** License Applicability. Except to the extent portions of this file are
 | 
			
		||||
** made subject to an alternative license as permitted in the SGI Free
 | 
			
		||||
** Software License B, Version 1.1 (the "License"), the contents of this
 | 
			
		||||
** file are subject only to the provisions of the License. You may not use
 | 
			
		||||
** this file except in compliance with the License. You may obtain a copy
 | 
			
		||||
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
 | 
			
		||||
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
 | 
			
		||||
** 
 | 
			
		||||
** http://oss.sgi.com/projects/FreeB
 | 
			
		||||
** 
 | 
			
		||||
** Note that, as provided in the License, the Software is distributed on an
 | 
			
		||||
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
 | 
			
		||||
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
 | 
			
		||||
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
 | 
			
		||||
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
 | 
			
		||||
** 
 | 
			
		||||
** Original Code. The Original Code is: OpenGL Sample Implementation,
 | 
			
		||||
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
 | 
			
		||||
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
 | 
			
		||||
** Copyright in any portions created by third parties is as indicated
 | 
			
		||||
** elsewhere herein. All Rights Reserved.
 | 
			
		||||
** 
 | 
			
		||||
** Additional Notice Provisions: The application programming interfaces
 | 
			
		||||
** established by SGI in conjunction with the Original Code are The
 | 
			
		||||
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
 | 
			
		||||
** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
 | 
			
		||||
** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
 | 
			
		||||
** Window System(R) (Version 1.3), released October 19, 1998. This software
 | 
			
		||||
** was created using the OpenGL(R) version 1.2.1 Sample Implementation
 | 
			
		||||
** published by SGI, but has not been independently verified as being
 | 
			
		||||
** compliant with the OpenGL(R) version 1.2.1 Specification.
 | 
			
		||||
**
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef XFree86LOADER
 | 
			
		||||
#include <sys/types.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define GL_CORE_SGI  1
 | 
			
		||||
#define GL_CORE_MESA 2
 | 
			
		||||
 | 
			
		||||
typedef struct __GLcontextRec __GLcontext;
 | 
			
		||||
typedef struct __GLinterfaceRec __GLinterface;
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** This file defines the interface between the GL core and the surrounding
 | 
			
		||||
** "operating system" that supports it (currently the GLX or WGL extensions).
 | 
			
		||||
**
 | 
			
		||||
** Members (data and function pointers) are documented as imported or
 | 
			
		||||
** exported according to how they are used by the core rendering functions.
 | 
			
		||||
** Imported members are initialized by the "operating system" and used by
 | 
			
		||||
** the core functions.  Exported members are initialized by the core functions
 | 
			
		||||
** and used by the "operating system".
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Mode and limit information for a context.  This information is
 | 
			
		||||
** kept around in the context so that values can be used during
 | 
			
		||||
** command execution, and for returning information about the
 | 
			
		||||
** context to the application.
 | 
			
		||||
*/
 | 
			
		||||
typedef struct __GLcontextModesRec {
 | 
			
		||||
    GLboolean rgbMode;
 | 
			
		||||
    GLboolean colorIndexMode;
 | 
			
		||||
    GLboolean doubleBufferMode;
 | 
			
		||||
    GLboolean stereoMode;
 | 
			
		||||
 | 
			
		||||
    GLboolean haveAccumBuffer;
 | 
			
		||||
    GLboolean haveDepthBuffer;
 | 
			
		||||
    GLboolean haveStencilBuffer;
 | 
			
		||||
 | 
			
		||||
    GLint redBits, greenBits, blueBits, alphaBits;	/* bits per comp */
 | 
			
		||||
    GLuint redMask, greenMask, blueMask, alphaMask;
 | 
			
		||||
    GLint rgbBits;		/* total bits for rgb */
 | 
			
		||||
    GLint indexBits;		/* total bits for colorindex */
 | 
			
		||||
 | 
			
		||||
    GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
 | 
			
		||||
    GLint depthBits;
 | 
			
		||||
    GLint stencilBits;
 | 
			
		||||
 | 
			
		||||
    GLint numAuxBuffers;
 | 
			
		||||
 | 
			
		||||
    GLint level;
 | 
			
		||||
 | 
			
		||||
    GLint pixmapMode;
 | 
			
		||||
} __GLcontextModes;
 | 
			
		||||
 | 
			
		||||
/************************************************************************/
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Structure used for allocating and freeing drawable private memory.
 | 
			
		||||
** (like software buffers, for example).
 | 
			
		||||
**
 | 
			
		||||
** The memory allocation routines are provided by the surrounding
 | 
			
		||||
** "operating system" code, and they are to be used for allocating
 | 
			
		||||
** software buffers and things which are associated with the drawable,
 | 
			
		||||
** and used by any context which draws to that drawable.  There are
 | 
			
		||||
** separate memory allocation functions for drawables and contexts
 | 
			
		||||
** since drawables and contexts can be created and destroyed independently
 | 
			
		||||
** of one another, and the "operating system" may want to use separate
 | 
			
		||||
** allocation arenas for each.
 | 
			
		||||
**
 | 
			
		||||
** The freePrivate function is filled in by the core routines when they
 | 
			
		||||
** allocates software buffers, and stick them in "private".  The freePrivate
 | 
			
		||||
** function will destroy anything allocated to this drawable (to be called
 | 
			
		||||
** when the drawable is destroyed).
 | 
			
		||||
*/
 | 
			
		||||
typedef struct __GLdrawableRegionRec __GLdrawableRegion;
 | 
			
		||||
typedef struct __GLdrawableBufferRec __GLdrawableBuffer;
 | 
			
		||||
typedef struct __GLdrawablePrivateRec __GLdrawablePrivate;
 | 
			
		||||
 | 
			
		||||
typedef struct __GLregionRectRec {
 | 
			
		||||
    /* lower left (inside the rectangle) */
 | 
			
		||||
    GLint x0, y0;
 | 
			
		||||
    /* upper right (outside the rectangle) */
 | 
			
		||||
    GLint x1, y1;
 | 
			
		||||
} __GLregionRect;
 | 
			
		||||
 | 
			
		||||
struct __GLdrawableRegionRec {
 | 
			
		||||
    GLint numRects;
 | 
			
		||||
    __GLregionRect *rects;
 | 
			
		||||
    __GLregionRect boundingRect;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/************************************************************************/
 | 
			
		||||
 | 
			
		||||
/* masks for the buffers */
 | 
			
		||||
#define __GL_FRONT_BUFFER_MASK		0x00000001
 | 
			
		||||
#define	__GL_FRONT_LEFT_BUFFER_MASK	0x00000001
 | 
			
		||||
#define	__GL_FRONT_RIGHT_BUFFER_MASK	0x00000002
 | 
			
		||||
#define	__GL_BACK_BUFFER_MASK		0x00000004
 | 
			
		||||
#define __GL_BACK_LEFT_BUFFER_MASK	0x00000004
 | 
			
		||||
#define __GL_BACK_RIGHT_BUFFER_MASK	0x00000008
 | 
			
		||||
#define	__GL_ACCUM_BUFFER_MASK		0x00000010
 | 
			
		||||
#define	__GL_DEPTH_BUFFER_MASK		0x00000020
 | 
			
		||||
#define	__GL_STENCIL_BUFFER_MASK	0x00000040
 | 
			
		||||
#define	__GL_AUX_BUFFER_MASK(i)		(0x0000080 << (i))
 | 
			
		||||
 | 
			
		||||
#define __GL_ALL_BUFFER_MASK		0xffffffff
 | 
			
		||||
 | 
			
		||||
/* what Resize routines return if resize resorted to fallback case */
 | 
			
		||||
#define __GL_BUFFER_FALLBACK	0x10
 | 
			
		||||
 | 
			
		||||
typedef void (*__GLbufFallbackInitFn)(__GLdrawableBuffer *buf, 
 | 
			
		||||
				      __GLdrawablePrivate *glPriv, GLint bits);
 | 
			
		||||
typedef void (*__GLbufMainInitFn)(__GLdrawableBuffer *buf, 
 | 
			
		||||
				  __GLdrawablePrivate *glPriv, GLint bits,
 | 
			
		||||
				  __GLbufFallbackInitFn back);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** A drawable buffer
 | 
			
		||||
**
 | 
			
		||||
** This data structure describes the context side of a drawable.  
 | 
			
		||||
**
 | 
			
		||||
** According to the spec there could be multiple contexts bound to the same
 | 
			
		||||
** drawable at the same time (from different threads).  In order to avoid
 | 
			
		||||
** multiple-access conflicts, locks are used to serialize access.  When a
 | 
			
		||||
** thread needs to access (read or write) a member of the drawable, it takes
 | 
			
		||||
** a lock first.  Some of the entries in the drawable are treated "mostly
 | 
			
		||||
** constant", so we take the freedom of allowing access to them without
 | 
			
		||||
** taking a lock (for optimization reasons).
 | 
			
		||||
**
 | 
			
		||||
** For more details regarding locking, see buffers.h in the GL core
 | 
			
		||||
*/
 | 
			
		||||
struct __GLdrawableBufferRec {
 | 
			
		||||
    /*
 | 
			
		||||
    ** Buffer dimensions
 | 
			
		||||
    */
 | 
			
		||||
    GLint width, height, depth;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Framebuffer base address
 | 
			
		||||
    */
 | 
			
		||||
    void *base;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Framebuffer size (in bytes)
 | 
			
		||||
    */
 | 
			
		||||
    GLuint size;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Size (in bytes) of each element in the framebuffer
 | 
			
		||||
    */
 | 
			
		||||
    GLuint elementSize;
 | 
			
		||||
    GLuint elementSizeLog2;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Element skip from one scanline to the next.
 | 
			
		||||
    ** If the buffer is part of another buffer (for example, fullscreen
 | 
			
		||||
    ** front buffer), outerWidth is the width of that buffer.
 | 
			
		||||
    */
 | 
			
		||||
    GLint outerWidth;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** outerWidth * elementSize
 | 
			
		||||
    */
 | 
			
		||||
    GLint byteWidth;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Allocation/deallocation is done based on this handle.  A handle
 | 
			
		||||
    ** is conceptually different from the framebuffer 'base'.
 | 
			
		||||
    */
 | 
			
		||||
    void *handle;
 | 
			
		||||
 | 
			
		||||
    /* imported */
 | 
			
		||||
    GLboolean (*resize)(__GLdrawableBuffer *buf,
 | 
			
		||||
			GLint x, GLint y, GLuint width, GLuint height, 
 | 
			
		||||
			__GLdrawablePrivate *glPriv, GLuint bufferMask);
 | 
			
		||||
    void (*lock)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
 | 
			
		||||
    void (*unlock)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
 | 
			
		||||
    void (*fill)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv,
 | 
			
		||||
    		GLuint val, GLint x, GLint y, GLint w, GLint h);
 | 
			
		||||
    void (*free)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
 | 
			
		||||
 | 
			
		||||
    /* exported */
 | 
			
		||||
    void (*freePrivate)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
    void *privatePtr;
 | 
			
		||||
#else
 | 
			
		||||
    void *private;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    /* private */
 | 
			
		||||
    void *other;	/* implementation private data */
 | 
			
		||||
    __GLbufMainInitFn mainInit;
 | 
			
		||||
    __GLbufFallbackInitFn fallbackInit;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** The context side of the drawable private
 | 
			
		||||
*/
 | 
			
		||||
struct __GLdrawablePrivateRec {
 | 
			
		||||
    /*
 | 
			
		||||
    ** Drawable Modes
 | 
			
		||||
    */
 | 
			
		||||
    __GLcontextModes *modes;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Drawable size
 | 
			
		||||
    */
 | 
			
		||||
    GLuint width, height;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Origin in screen coordinates of the drawable
 | 
			
		||||
    */
 | 
			
		||||
    GLint xOrigin, yOrigin;
 | 
			
		||||
#ifdef __GL_ALIGNED_BUFFERS
 | 
			
		||||
    /*
 | 
			
		||||
    ** Drawable offset from screen origin
 | 
			
		||||
    */
 | 
			
		||||
    GLint xOffset, yOffset;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Alignment restriction
 | 
			
		||||
    */
 | 
			
		||||
    GLint xAlignment, yAlignment;
 | 
			
		||||
#endif
 | 
			
		||||
    /*
 | 
			
		||||
    ** Should we invert the y axis?
 | 
			
		||||
    */
 | 
			
		||||
    GLint yInverted;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Mask specifying which buffers are renderable by the hw
 | 
			
		||||
    */
 | 
			
		||||
    GLuint accelBufferMask;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** the buffers themselves
 | 
			
		||||
    */
 | 
			
		||||
    __GLdrawableBuffer frontBuffer;
 | 
			
		||||
    __GLdrawableBuffer backBuffer;
 | 
			
		||||
    __GLdrawableBuffer accumBuffer;
 | 
			
		||||
    __GLdrawableBuffer depthBuffer;
 | 
			
		||||
    __GLdrawableBuffer stencilBuffer;
 | 
			
		||||
#if defined(__GL_NUMBER_OF_AUX_BUFFERS) && (__GL_NUMBER_OF_AUX_BUFFERS > 0)
 | 
			
		||||
    __GLdrawableBuffer *auxBuffer;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    __GLdrawableRegion ownershipRegion;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Lock for the drawable private structure
 | 
			
		||||
    */
 | 
			
		||||
    void *lock;
 | 
			
		||||
#ifdef DEBUG
 | 
			
		||||
    /* lock debugging info */
 | 
			
		||||
    int lockRefCount;
 | 
			
		||||
    int lockLine[10];
 | 
			
		||||
    char *lockFile[10];
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    /* imported */
 | 
			
		||||
    void *(*malloc)(size_t size);
 | 
			
		||||
    void *(*calloc)(size_t numElem, size_t elemSize);
 | 
			
		||||
    void *(*realloc)(void *oldAddr, size_t newSize);
 | 
			
		||||
    void (*free)(void *addr);
 | 
			
		||||
 | 
			
		||||
    GLboolean (*addSwapRect)(__GLdrawablePrivate *glPriv, 
 | 
			
		||||
			     GLint x, GLint y, GLsizei width, GLsizei height);
 | 
			
		||||
    void (*setClipRect)(__GLdrawablePrivate *glPriv, 
 | 
			
		||||
			GLint x, GLint y, GLsizei width, GLsizei height);
 | 
			
		||||
    void (*updateClipRegion)(__GLdrawablePrivate *glPriv);
 | 
			
		||||
    GLboolean (*resize)(__GLdrawablePrivate *glPriv);
 | 
			
		||||
    void (*getDrawableSize)(__GLdrawablePrivate *glPriv, 
 | 
			
		||||
			    GLint *x, GLint *y, GLuint *width, GLuint *height);
 | 
			
		||||
 | 
			
		||||
    void (*lockDP)(__GLdrawablePrivate *glPriv, __GLcontext *gc);
 | 
			
		||||
    void (*unlockDP)(__GLdrawablePrivate *glPriv);
 | 
			
		||||
 | 
			
		||||
    /* exported */
 | 
			
		||||
    void *wsPriv;	/* pointer to the window system DrawablePrivate */
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
    void *privatePtr;
 | 
			
		||||
#else
 | 
			
		||||
    void *private;
 | 
			
		||||
#endif
 | 
			
		||||
    void (*freePrivate)(__GLdrawablePrivate *);
 | 
			
		||||
 | 
			
		||||
    /* client data */
 | 
			
		||||
    void *other;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Macros to lock/unlock the drawable private
 | 
			
		||||
*/
 | 
			
		||||
#if defined(DEBUG)
 | 
			
		||||
#define __GL_LOCK_DP(glPriv,gc) \
 | 
			
		||||
    (*(glPriv)->lockDP)(glPriv,gc); \
 | 
			
		||||
    (glPriv)->lockLine[(glPriv)->lockRefCount] = __LINE__; \
 | 
			
		||||
    (glPriv)->lockFile[(glPriv)->lockRefCount] = __FILE__; \
 | 
			
		||||
    (glPriv)->lockRefCount++
 | 
			
		||||
#define __GL_UNLOCK_DP(glPriv) \
 | 
			
		||||
    (glPriv)->lockRefCount--; \
 | 
			
		||||
    (glPriv)->lockLine[(glPriv)->lockRefCount] = 0; \
 | 
			
		||||
    (glPriv)->lockFile[(glPriv)->lockRefCount] = NULL; \
 | 
			
		||||
    (*(glPriv)->unlockDP)(glPriv)
 | 
			
		||||
#else /* DEBUG */
 | 
			
		||||
#define __GL_LOCK_DP(glPriv,gc)		(*(glPriv)->lockDP)(glPriv,gc)
 | 
			
		||||
#define	__GL_UNLOCK_DP(glPriv)		(*(glPriv)->unlockDP)(glPriv)
 | 
			
		||||
#endif /* DEBUG */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Procedures which are imported by the GL from the surrounding
 | 
			
		||||
** "operating system".  Math functions are not considered part of the
 | 
			
		||||
** "operating system".
 | 
			
		||||
*/
 | 
			
		||||
typedef struct __GLimportsRec {
 | 
			
		||||
    /* Memory management */
 | 
			
		||||
    void * (*malloc)(__GLcontext *gc, size_t size);
 | 
			
		||||
    void *(*calloc)(__GLcontext *gc, size_t numElem, size_t elemSize);
 | 
			
		||||
    void *(*realloc)(__GLcontext *gc, void *oldAddr, size_t newSize);
 | 
			
		||||
    void (*free)(__GLcontext *gc, void *addr);
 | 
			
		||||
 | 
			
		||||
    /* Error handling */
 | 
			
		||||
    void (*warning)(__GLcontext *gc, char *fmt);
 | 
			
		||||
    void (*fatal)(__GLcontext *gc, char *fmt);
 | 
			
		||||
 | 
			
		||||
    /* other system calls */
 | 
			
		||||
    char *(CAPI *getenv)(__GLcontext *gc, const char *var);
 | 
			
		||||
    int (CAPI *atoi)(__GLcontext *gc, const char *str);
 | 
			
		||||
    int (CAPI *sprintf)(__GLcontext *gc, char *str, const char *fmt, ...);
 | 
			
		||||
    void *(CAPI *fopen)(__GLcontext *gc, const char *path, const char *mode);
 | 
			
		||||
    int (CAPI *fclose)(__GLcontext *gc, void *stream);
 | 
			
		||||
    int (CAPI *fprintf)(__GLcontext *gc, void *stream, const char *fmt, ...);
 | 
			
		||||
 | 
			
		||||
    /* Drawing surface management */
 | 
			
		||||
    __GLdrawablePrivate *(*getDrawablePrivate)(__GLcontext *gc);
 | 
			
		||||
 | 
			
		||||
    /* Pointer to the window system context */
 | 
			
		||||
    void *wscx;
 | 
			
		||||
 | 
			
		||||
    /* Operating system dependent data goes here */
 | 
			
		||||
    void *other;
 | 
			
		||||
} __GLimports;
 | 
			
		||||
 | 
			
		||||
/************************************************************************/
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Procedures which are exported by the GL to the surrounding "operating
 | 
			
		||||
** system" so that it can manage multiple GL context's.
 | 
			
		||||
*/
 | 
			
		||||
typedef struct __GLexportsRec {
 | 
			
		||||
    /* Context management (return GL_FALSE on failure) */
 | 
			
		||||
    GLboolean (*destroyContext)(__GLcontext *gc);
 | 
			
		||||
    GLboolean (*loseCurrent)(__GLcontext *gc);
 | 
			
		||||
    GLboolean (*makeCurrent)(__GLcontext *gc);
 | 
			
		||||
    GLboolean (*shareContext)(__GLcontext *gc, __GLcontext *gcShare);
 | 
			
		||||
    GLboolean (*copyContext)(__GLcontext *dst, const __GLcontext *src, GLuint mask);
 | 
			
		||||
    GLboolean (*forceCurrent)(__GLcontext *gc);
 | 
			
		||||
 | 
			
		||||
    /* Drawing surface notification callbacks */
 | 
			
		||||
    GLboolean (*notifyResize)(__GLcontext *gc);
 | 
			
		||||
    void (*notifyDestroy)(__GLcontext *gc);
 | 
			
		||||
    void (*notifySwapBuffers)(__GLcontext *gc);
 | 
			
		||||
 | 
			
		||||
    /* Dispatch table override control for external agents like libGLS */
 | 
			
		||||
    struct __GLdispatchStateRec* (*dispatchExec)(__GLcontext *gc);
 | 
			
		||||
    void (*beginDispatchOverride)(__GLcontext *gc);
 | 
			
		||||
    void (*endDispatchOverride)(__GLcontext *gc);
 | 
			
		||||
} __GLexports;
 | 
			
		||||
 | 
			
		||||
/************************************************************************/
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** This must be the first member of a __GLcontext structure.  This is the
 | 
			
		||||
** only part of a context that is exposed to the outside world; everything
 | 
			
		||||
** else is opaque.
 | 
			
		||||
*/
 | 
			
		||||
struct __GLinterfaceRec {
 | 
			
		||||
    __GLimports imports;
 | 
			
		||||
    __GLexports exports;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern __GLcontext *__glCoreCreateContext(__GLimports *, __GLcontextModes *);
 | 
			
		||||
extern void __glCoreNopDispatch(void);
 | 
			
		||||
 | 
			
		||||
#endif /* __gl_core_h_ */
 | 
			
		||||
@@ -1,46 +1,125 @@
 | 
			
		||||
/* prototypes for the Mesa WGL functions */
 | 
			
		||||
/* relocated here so that I could make GLUT get them properly */
 | 
			
		||||
 | 
			
		||||
#ifndef GL_H
 | 
			
		||||
#   include <gl/gl.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef _MSC_VER
 | 
			
		||||
#  pragma warning( push )
 | 
			
		||||
#  pragma warning( disable : 4273 ) /* 'function' : inconsistent DLL linkage. dllexport assumed. */
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglDeleteContext(HGLRC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglMakeCurrent(HDC,HGLRC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglSetPixelFormat(HDC, int, const PIXELFORMATDESCRIPTOR *);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglSwapBuffers(HDC hdc);
 | 
			
		||||
WGLAPI HDC   GLAPIENTRY wglGetCurrentDC(void);
 | 
			
		||||
WGLAPI HGLRC GLAPIENTRY wglCreateContext(HDC);
 | 
			
		||||
WGLAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC,int);
 | 
			
		||||
WGLAPI HGLRC GLAPIENTRY wglGetCurrentContext(void);
 | 
			
		||||
WGLAPI PROC  GLAPIENTRY wglGetProcAddress(const char*);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglChoosePixelFormat(HDC, const PIXELFORMATDESCRIPTOR *);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglCopyContext(HGLRC, HGLRC, unsigned int);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglDeleteContext(HGLRC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglDescribeLayerPlane(HDC, int, int, unsigned int,LPLAYERPLANEDESCRIPTOR);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglDescribePixelFormat(HDC,int, unsigned int, LPPIXELFORMATDESCRIPTOR);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglGetLayerPaletteEntries(HDC, int, int, int,COLORREF *);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglGetPixelFormat(HDC hdc);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglMakeCurrent(HDC, HGLRC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglRealizeLayerPalette(HDC, int, int);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglSetLayerPaletteEntries(HDC, int, int, int,const COLORREF *);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglShareLists(HGLRC, HGLRC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglSwapLayerBuffers(HDC, unsigned int);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglUseFontBitmapsA(HDC, unsigned long, unsigned long, unsigned long);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglUseFontBitmapsW(HDC, unsigned long, unsigned long, unsigned long);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglUseFontOutlinesA(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglUseFontOutlinesW(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
 | 
			
		||||
WGLAPI int   GLAPIENTRY SwapBuffers(HDC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY ChoosePixelFormat(HDC,const PIXELFORMATDESCRIPTOR *);
 | 
			
		||||
WGLAPI int   GLAPIENTRY DescribePixelFormat(HDC,int,unsigned int,PIXELFORMATDESCRIPTOR *);
 | 
			
		||||
WGLAPI int   GLAPIENTRY GetPixelFormat(HDC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR *);
 | 
			
		||||
 | 
			
		||||
#ifdef _MSC_VER
 | 
			
		||||
#  pragma warning( pop )
 | 
			
		||||
#endif
 | 
			
		||||
/* $Id: mesa_wgl.h,v 1.6 2001/05/07 13:58:00 gareth Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.1
 | 
			
		||||
 *
 | 
			
		||||
 * Copyright (C) 1999  Brian Paul   All Rights Reserved.
 | 
			
		||||
 *
 | 
			
		||||
 * Permission is hereby granted, free of charge, to any person obtaining a
 | 
			
		||||
 * copy of this software and associated documentation files (the "Software"),
 | 
			
		||||
 * to deal in the Software without restriction, including without limitation
 | 
			
		||||
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 | 
			
		||||
 * and/or sell copies of the Software, and to permit persons to whom the
 | 
			
		||||
 * Software is furnished to do so, subject to the following conditions:
 | 
			
		||||
 *
 | 
			
		||||
 * The above copyright notice and this permission notice shall be included
 | 
			
		||||
 * in all copies or substantial portions of the Software.
 | 
			
		||||
 *
 | 
			
		||||
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 | 
			
		||||
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
			
		||||
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 | 
			
		||||
 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
 | 
			
		||||
 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 | 
			
		||||
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* prototypes for the Mesa WGL functions */
 | 
			
		||||
/* relocated here so that I could make GLUT get them properly */
 | 
			
		||||
 | 
			
		||||
#define _mesa_wgl_h_
 | 
			
		||||
 | 
			
		||||
#ifndef _mesa_wgl_h_
 | 
			
		||||
#define _mesa_wgl_h_
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <gl/gl.h>
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN32__))
 | 
			
		||||
#  if defined(_MSC_VER) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
 | 
			
		||||
#    define GLAPI __declspec(dllexport)
 | 
			
		||||
#    define WGLAPI __declspec(dllexport)
 | 
			
		||||
#  elif defined(_MSC_VER) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
 | 
			
		||||
#    define GLAPI __declspec(dllimport)
 | 
			
		||||
#    define WGLAPI __declspec(dllimport)
 | 
			
		||||
#  else /* for use with static link lib build of Win32 edition only */
 | 
			
		||||
#    define GLAPI extern
 | 
			
		||||
#    define WGLAPI __declspec(dllimport)
 | 
			
		||||
#  endif /* _STATIC_MESA support */
 | 
			
		||||
#  define GLAPIENTRY __stdcall
 | 
			
		||||
#else
 | 
			
		||||
/* non-Windows compilation */
 | 
			
		||||
#  define GLAPI extern
 | 
			
		||||
#  define GLAPIENTRY
 | 
			
		||||
#endif /* WIN32 / CYGWIN32 bracket */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP)
 | 
			
		||||
#ifndef _GNU_H_WINDOWS32_FUNCTIONS
 | 
			
		||||
#	ifdef UNICODE
 | 
			
		||||
#		define wglUseFontBitmaps  wglUseFontBitmapsW
 | 
			
		||||
#		define wglUseFontOutlines  wglUseFontOutlinesW
 | 
			
		||||
#	else
 | 
			
		||||
#		define wglUseFontBitmaps  wglUseFontBitmapsA
 | 
			
		||||
#		define wglUseFontOutlines  wglUseFontOutlinesA
 | 
			
		||||
#	endif /* !UNICODE */
 | 
			
		||||
#endif /* _GNU_H_WINDOWS32_FUNCTIONS */
 | 
			
		||||
typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR;
 | 
			
		||||
typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT;
 | 
			
		||||
typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef _MSC_VER
 | 
			
		||||
#  pragma warning( disable : 4615 ) /* pragma warning : unknown user warning type*/
 | 
			
		||||
#  pragma warning( push )
 | 
			
		||||
#  pragma warning( disable : 4273 ) /* 'function' : inconsistent DLL linkage. dllexport assumed. */
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglDeleteContext(HGLRC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglMakeCurrent(HDC,HGLRC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglSetPixelFormat(HDC, int, const PIXELFORMATDESCRIPTOR *);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglSwapBuffers(HDC hdc);
 | 
			
		||||
WGLAPI HDC   GLAPIENTRY wglGetCurrentDC(void);
 | 
			
		||||
WGLAPI HGLRC GLAPIENTRY wglCreateContext(HDC);
 | 
			
		||||
WGLAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC,int);
 | 
			
		||||
WGLAPI HGLRC GLAPIENTRY wglGetCurrentContext(void);
 | 
			
		||||
WGLAPI PROC  GLAPIENTRY wglGetProcAddress(const char*);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglChoosePixelFormat(HDC, const PIXELFORMATDESCRIPTOR *);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglCopyContext(HGLRC, HGLRC, unsigned int);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglDeleteContext(HGLRC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglDescribeLayerPlane(HDC, int, int, unsigned int,LPLAYERPLANEDESCRIPTOR);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglDescribePixelFormat(HDC,int, unsigned int, LPPIXELFORMATDESCRIPTOR);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglGetLayerPaletteEntries(HDC, int, int, int,COLORREF *);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglGetPixelFormat(HDC hdc);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglMakeCurrent(HDC, HGLRC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglRealizeLayerPalette(HDC, int, int);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglSetLayerPaletteEntries(HDC, int, int, int,const COLORREF *);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglShareLists(HGLRC, HGLRC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglSwapLayerBuffers(HDC, unsigned int);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglUseFontBitmapsA(HDC, unsigned long, unsigned long, unsigned long);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglUseFontBitmapsW(HDC, unsigned long, unsigned long, unsigned long);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglUseFontOutlinesA(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglUseFontOutlinesW(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
 | 
			
		||||
WGLAPI int   GLAPIENTRY SwapBuffers(HDC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY ChoosePixelFormat(HDC,const PIXELFORMATDESCRIPTOR *);
 | 
			
		||||
WGLAPI int   GLAPIENTRY DescribePixelFormat(HDC,int,unsigned int,LPPIXELFORMATDESCRIPTOR);
 | 
			
		||||
WGLAPI int   GLAPIENTRY GetPixelFormat(HDC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR *);
 | 
			
		||||
 | 
			
		||||
#ifdef _MSC_VER
 | 
			
		||||
#  pragma warning( pop )
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#endif /* _mesa_wgl_h_ */
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
/* $Id: osmesa.h,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
 | 
			
		||||
/* $Id: osmesa.h,v 1.9.2.1 2002/04/26 13:53:09 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.1
 | 
			
		||||
 * Version:  4.0.3
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (C) 1999  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * Copyright (C) 1999-2002  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * 
 | 
			
		||||
 * Permission is hereby granted, free of charge, to any person obtaining a
 | 
			
		||||
 * copy of this software and associated documentation files (the "Software"),
 | 
			
		||||
@@ -25,26 +25,6 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: osmesa.h,v $
 | 
			
		||||
 * Revision 1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Initial revision
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.4  1999/02/14 03:39:09  brianp
 | 
			
		||||
 * new copyright
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.3  1999/01/03 02:52:30  brianp
 | 
			
		||||
 * now using GLAPI and GLAPIENTRY keywords (Ted Jump)
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.2  1998/07/26 01:33:51  brianp
 | 
			
		||||
 * added WINGDIAPI and APIENTRY keywords per Ted Jump
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.1  1998/02/13 03:17:50  brianp
 | 
			
		||||
 * Initial revision
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa Off-Screen rendering interface.
 | 
			
		||||
 *
 | 
			
		||||
@@ -70,23 +50,21 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifndef OSMESA_H
 | 
			
		||||
#define OSMESA_H
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include "GL/gl.h"
 | 
			
		||||
#include <GL/gl.h>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define OSMESA_MAJOR_VERSION 3
 | 
			
		||||
#define OSMESA_MAJOR_VERSION 4
 | 
			
		||||
#define OSMESA_MINOR_VERSION 0
 | 
			
		||||
#define OSMESA_PATCH_VERSION 3
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -100,6 +78,7 @@ extern "C" {
 | 
			
		||||
#define OSMESA_ARGB		0x2
 | 
			
		||||
#define OSMESA_RGB		GL_RGB
 | 
			
		||||
#define OSMESA_BGR		0x4
 | 
			
		||||
#define OSMESA_RGB_565		0x5
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
@@ -117,7 +96,8 @@ extern "C" {
 | 
			
		||||
#define OSMESA_HEIGHT		0x21
 | 
			
		||||
#define OSMESA_FORMAT		0x22
 | 
			
		||||
#define OSMESA_TYPE		0x23
 | 
			
		||||
 | 
			
		||||
#define OSMESA_MAX_WIDTH	0x24  /* new in 4.0 */
 | 
			
		||||
#define OSMESA_MAX_HEIGHT	0x25  /* new in 4.0 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct osmesa_context *OSMesaContext;
 | 
			
		||||
@@ -138,18 +118,31 @@ typedef struct osmesa_context *OSMesaContext;
 | 
			
		||||
 *                     display lists.  NULL indicates no sharing.
 | 
			
		||||
 * Return:  an OSMesaContext or 0 if error
 | 
			
		||||
 */
 | 
			
		||||
GLAPI OSMesaContext GLAPIENTRY OSMesaCreateContext( GLenum format,
 | 
			
		||||
                                          OSMesaContext sharelist );
 | 
			
		||||
GLAPI OSMesaContext GLAPIENTRY
 | 
			
		||||
OSMesaCreateContext( GLenum format, OSMesaContext sharelist );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Create an Off-Screen Mesa rendering context and specify desired
 | 
			
		||||
 * size of depth buffer, stencil buffer and accumulation buffer.
 | 
			
		||||
 * If you specify zero for depthBits, stencilBits, accumBits you
 | 
			
		||||
 * can save some memory.
 | 
			
		||||
 *
 | 
			
		||||
 * New in Mesa 3.5
 | 
			
		||||
 */
 | 
			
		||||
GLAPI OSMesaContext GLAPIENTRY
 | 
			
		||||
OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
 | 
			
		||||
                        GLint accumBits, OSMesaContext sharelist);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Destroy an Off-Screen Mesa rendering context.
 | 
			
		||||
 *
 | 
			
		||||
 * Input:  ctx - the context to destroy
 | 
			
		||||
 */
 | 
			
		||||
GLAPI void GLAPIENTRY OSMesaDestroyContext( OSMesaContext ctx );
 | 
			
		||||
GLAPI void GLAPIENTRY
 | 
			
		||||
OSMesaDestroyContext( OSMesaContext ctx );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -180,9 +173,9 @@ GLAPI void GLAPIENTRY OSMesaDestroyContext( OSMesaContext ctx );
 | 
			
		||||
 *          invalid buffer address, type!=GL_UNSIGNED_BYTE, width<1, height<1,
 | 
			
		||||
 *          width>internal limit or height>internal limit.
 | 
			
		||||
 */
 | 
			
		||||
GLAPI GLboolean GLAPIENTRY OSMesaMakeCurrent( OSMesaContext ctx,
 | 
			
		||||
                                    void *buffer, GLenum type,
 | 
			
		||||
                                    GLsizei width, GLsizei height );
 | 
			
		||||
GLAPI GLboolean GLAPIENTRY
 | 
			
		||||
OSMesaMakeCurrent( OSMesaContext ctx, void *buffer, GLenum type,
 | 
			
		||||
                   GLsizei width, GLsizei height );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -190,7 +183,8 @@ GLAPI GLboolean GLAPIENTRY OSMesaMakeCurrent( OSMesaContext ctx,
 | 
			
		||||
/*
 | 
			
		||||
 * Return the current Off-Screen Mesa rendering context handle.
 | 
			
		||||
 */
 | 
			
		||||
GLAPI OSMesaContext GLAPIENTRY OSMesaGetCurrentContext( void );
 | 
			
		||||
GLAPI OSMesaContext GLAPIENTRY
 | 
			
		||||
OSMesaGetCurrentContext( void );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -207,12 +201,13 @@ GLAPI OSMesaContext GLAPIENTRY OSMesaGetCurrentContext( void );
 | 
			
		||||
 *
 | 
			
		||||
 * New in version 2.0.
 | 
			
		||||
 */
 | 
			
		||||
GLAPI void GLAPIENTRY OSMesaPixelStore( GLint pname, GLint value );
 | 
			
		||||
GLAPI void GLAPIENTRY
 | 
			
		||||
OSMesaPixelStore( GLint pname, GLint value );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Return context info.  This is like glGetIntegerv.
 | 
			
		||||
 * Return an integer value like glGetIntegerv.
 | 
			
		||||
 * Input:  pname -
 | 
			
		||||
 *                 OSMESA_WIDTH  return current image width
 | 
			
		||||
 *                 OSMESA_HEIGHT  return current image height
 | 
			
		||||
@@ -222,7 +217,8 @@ GLAPI void GLAPIENTRY OSMesaPixelStore( GLint pname, GLint value );
 | 
			
		||||
 *                 OSMESA_Y_UP returns 1 or 0 to indicate Y axis direction
 | 
			
		||||
 *         value - pointer to integer in which to return result.
 | 
			
		||||
 */
 | 
			
		||||
GLAPI void GLAPIENTRY OSMesaGetIntegerv( GLint pname, GLint *value );
 | 
			
		||||
GLAPI void GLAPIENTRY
 | 
			
		||||
OSMesaGetIntegerv( GLint pname, GLint *value );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -236,12 +232,27 @@ GLAPI void GLAPIENTRY OSMesaGetIntegerv( GLint pname, GLint *value );
 | 
			
		||||
 *
 | 
			
		||||
 * New in Mesa 2.4.
 | 
			
		||||
 */
 | 
			
		||||
GLAPI GLboolean GLAPIENTRY OSMesaGetDepthBuffer( OSMesaContext c,
 | 
			
		||||
                                       GLint *width, GLint *height,
 | 
			
		||||
                                       GLint *bytesPerValue, void **buffer );
 | 
			
		||||
GLAPI GLboolean GLAPIENTRY
 | 
			
		||||
OSMesaGetDepthBuffer( OSMesaContext c, GLint *width, GLint *height,
 | 
			
		||||
                      GLint *bytesPerValue, void **buffer );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Return the color buffer associated with an OSMesa context.
 | 
			
		||||
 * Input:  c - the OSMesa context
 | 
			
		||||
 * Output:  width, height - size of buffer in pixels
 | 
			
		||||
 *          format - buffer format (OSMESA_FORMAT)
 | 
			
		||||
 *          buffer - pointer to depth buffer values
 | 
			
		||||
 * Return:  GL_TRUE or GL_FALSE to indicate success or failure.
 | 
			
		||||
 *
 | 
			
		||||
 * New in Mesa 3.3.
 | 
			
		||||
 */
 | 
			
		||||
GLAPI GLboolean GLAPIENTRY
 | 
			
		||||
OSMesaGetColorBuffer( OSMesaContext c, GLint *width, GLint *height,
 | 
			
		||||
                      GLint *format, void **buffer );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if defined(__BEOS__) || defined(__QUICKDRAW__)
 | 
			
		||||
#pragma export off
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +1,9 @@
 | 
			
		||||
/* $Id: svgamesa.h,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
 | 
			
		||||
/* $Id: svgamesa.h,v 1.6 2001/09/23 16:06:13 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.0
 | 
			
		||||
 * Copyright (C) 1995-1998  Brian Paul
 | 
			
		||||
 * Version:  4.0
 | 
			
		||||
 * Copyright (C) 1995-2001  Brian Paul
 | 
			
		||||
 *
 | 
			
		||||
 * This library is free software; you can redistribute it and/or
 | 
			
		||||
 * modify it under the terms of the GNU Library General Public
 | 
			
		||||
@@ -21,18 +21,6 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: svgamesa.h,v $
 | 
			
		||||
 * Revision 1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Initial revision
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.0  1998/02/20 05:07:24  brianp
 | 
			
		||||
 * initial rev
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * SVGA/Mesa interface for Linux.
 | 
			
		||||
 */
 | 
			
		||||
@@ -64,7 +52,7 @@
 | 
			
		||||
#define SVGAMESA_H
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define SVGAMESA_MAJOR_VERSION 3
 | 
			
		||||
#define SVGAMESA_MAJOR_VERSION 4
 | 
			
		||||
#define SVGAMESA_MINOR_VERSION 0
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -87,16 +75,21 @@ typedef struct svgamesa_context *SVGAMesaContext;
 | 
			
		||||
/*
 | 
			
		||||
 * doubleBuffer flag new in version 2.4
 | 
			
		||||
 */
 | 
			
		||||
extern int SVGAMesaInit( int GraphMode );
 | 
			
		||||
 | 
			
		||||
extern int SVGAMesaClose( void );
 | 
			
		||||
 | 
			
		||||
extern SVGAMesaContext SVGAMesaCreateContext( GLboolean doubleBuffer );
 | 
			
		||||
 | 
			
		||||
extern void SVGAMesaDestroyContext( SVGAMesaContext ctx );
 | 
			
		||||
 | 
			
		||||
extern void SVGAMesaMakeCurrent( SVGAMesaContext ctx );
 | 
			
		||||
 | 
			
		||||
extern SVGAMesaContext SVGAMesaGetCurrentContext( void );
 | 
			
		||||
 | 
			
		||||
extern void SVGAMesaSwapBuffers( void );
 | 
			
		||||
 | 
			
		||||
extern void SVGAMesaSetCI(int ndx, GLubyte red, GLubyte green, GLubyte blue);
 | 
			
		||||
 | 
			
		||||
extern SVGAMesaContext SVGAMesaGetCurrentContext( void );
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										45
									
								
								include/GL/uglglutshapes.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								include/GL/uglglutshapes.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,45 @@
 | 
			
		||||
/* uglglutshapes.h - Public header GLUT Shapes */
 | 
			
		||||
 | 
			
		||||
/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1998. */
 | 
			
		||||
 | 
			
		||||
/* This program is freely distributable without licensing fees  and is
 | 
			
		||||
   provided without guarantee or warrantee expressed or  implied. This
 | 
			
		||||
   program is -not- in the public domain. */
 | 
			
		||||
 | 
			
		||||
#ifndef GLUTSHAPES_H
 | 
			
		||||
#define GLUTSHAPES_H
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include <GL/gl.h>  
 | 
			
		||||
 | 
			
		||||
void glutWireSphere (GLdouble radius, GLint slices, GLint stacks);
 | 
			
		||||
void glutSolidSphere (GLdouble radius, GLint slices, GLint stacks);
 | 
			
		||||
void glutWireCone (GLdouble base, GLdouble height,
 | 
			
		||||
		   GLint slices, GLint stacks);
 | 
			
		||||
void glutSolidCone (GLdouble base, GLdouble height,
 | 
			
		||||
		    GLint slices, GLint stacks);
 | 
			
		||||
void glutWireCube (GLdouble size);
 | 
			
		||||
void glutSolidCube (GLdouble size);
 | 
			
		||||
void glutWireTorus (GLdouble innerRadius, GLdouble outerRadius,
 | 
			
		||||
		    GLint sides, GLint rings);
 | 
			
		||||
void glutSolidTorus (GLdouble innerRadius, GLdouble outerRadius,
 | 
			
		||||
		     GLint sides, GLint rings);
 | 
			
		||||
void glutWireDodecahedron (void);
 | 
			
		||||
void glutSolidDodecahedron (void);
 | 
			
		||||
void glutWireOctahedron (void);
 | 
			
		||||
void glutSolidOctahedron (void);
 | 
			
		||||
void glutWireTetrahedron (void);
 | 
			
		||||
void glutSolidTetrahedron (void);
 | 
			
		||||
void glutWireIcosahedron (void);
 | 
			
		||||
void glutSolidIcosahedron (void);
 | 
			
		||||
void glutWireTeapot (GLdouble size);
 | 
			
		||||
void glutSolidTeapot (GLdouble size);
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
							
								
								
									
										155
									
								
								include/GL/uglmesa.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										155
									
								
								include/GL/uglmesa.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,155 @@
 | 
			
		||||
/* uglmesa.h - Public header UGL/Mesa */
 | 
			
		||||
 | 
			
		||||
/* Copyright (C) 2001 by Wind River Systems, Inc */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  4.0
 | 
			
		||||
 *
 | 
			
		||||
 * The MIT License
 | 
			
		||||
 * Permission is hereby granted, free of charge, to any person obtaining a
 | 
			
		||||
 * copy of this software and associated documentation files (the "Software"),
 | 
			
		||||
 * to deal in the Software without restriction, including without limitation
 | 
			
		||||
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 | 
			
		||||
 * and/or sell copies of the Software, and to permit persons to whom the
 | 
			
		||||
 * Software is furnished to do so, subject to the following conditions:
 | 
			
		||||
 *
 | 
			
		||||
 * The above copyright notice and this permission notice shall be included
 | 
			
		||||
 * in all copies or substantial portions of the Software.
 | 
			
		||||
 *
 | 
			
		||||
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 | 
			
		||||
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
			
		||||
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 | 
			
		||||
 * THE AUTHORS OR COPYRIGHT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 | 
			
		||||
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 | 
			
		||||
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 | 
			
		||||
 * DEALINGS IN THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Author:
 | 
			
		||||
 * Stephane Raimbault <stephane.raimbault@windriver.com> 
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef UGLMESA_H
 | 
			
		||||
#define UGLMESA_H
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define UGL_MESA_MAJOR_VERSION 4
 | 
			
		||||
#define UGL_MESA_MINOR_VERSION 0
 | 
			
		||||
 | 
			
		||||
#include <GL/gl.h>
 | 
			
		||||
#include <ugl/ugl.h>
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Values for display mode of uglMesaCreateContext ()
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * With these mask values, it's possible to test double buffer mode
 | 
			
		||||
 * with UGL_MESA_DOUBLE mask
 | 
			
		||||
 *
 | 
			
		||||
 * SINGLE  0000 0001
 | 
			
		||||
 * DOUBLE  0000 0110
 | 
			
		||||
 * -  SOFT 0000 0010
 | 
			
		||||
 * -  HARD 0000 0100
 | 
			
		||||
 * WINDML  0001 0000
 | 
			
		||||
 *
 | 
			
		||||
 * 
 | 
			
		||||
 */
 | 
			
		||||
#define UGL_MESA_SINGLE            0x01
 | 
			
		||||
#define UGL_MESA_DOUBLE            0x06
 | 
			
		||||
#define UGL_MESA_DOUBLE_SOFTWARE   0x02
 | 
			
		||||
#define UGL_MESA_DOUBLE_HARDWARE   0x04
 | 
			
		||||
    
 | 
			
		||||
#define UGL_MESA_WINDML_EXCLUSIVE  0x10
 | 
			
		||||
 | 
			
		||||
#define UGL_MESA_FULLSCREEN_WIDTH  0x0
 | 
			
		||||
#define UGL_MESA_FULLSCREEN_HEIGHT 0x0
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * uglMesaPixelStore() parameters:
 | 
			
		||||
 */
 | 
			
		||||
    
 | 
			
		||||
#define UGL_MESA_ROW_LENGTH	   0x20
 | 
			
		||||
#define UGL_MESA_Y_UP              0x21
 | 
			
		||||
 | 
			
		||||
/* 
 | 
			
		||||
 * Accepted by uglMesaGetIntegerv:
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#define UGL_MESA_LEFT_X		        0x01
 | 
			
		||||
#define UGL_MESA_TOP_Y		        0x02    
 | 
			
		||||
#define UGL_MESA_WIDTH		        0x03
 | 
			
		||||
#define UGL_MESA_HEIGHT		        0x04
 | 
			
		||||
#define UGL_MESA_DISPLAY_WIDTH          0x05
 | 
			
		||||
#define UGL_MESA_DISPLAY_HEIGHT         0x06
 | 
			
		||||
#define UGL_MESA_COLOR_FORMAT	        0x07
 | 
			
		||||
#define UGL_MESA_COLOR_MODEL            0x08
 | 
			
		||||
#define UGL_MESA_PIXEL_FORMAT           0x09
 | 
			
		||||
#define UGL_MESA_TYPE		        0x0A
 | 
			
		||||
#define UGL_MESA_RGB		        0x0B
 | 
			
		||||
#define UGL_MESA_COLOR_INDEXED          0x0C
 | 
			
		||||
#define UGL_MESA_SINGLE_BUFFER          0x0D
 | 
			
		||||
#define UGL_MESA_DOUBLE_BUFFER          0x0E
 | 
			
		||||
#define UGL_MESA_DOUBLE_BUFFER_SOFTWARE 0x0F
 | 
			
		||||
#define UGL_MESA_DOUBLE_BUFFER_HARDWARE 0x10
 | 
			
		||||
    
 | 
			
		||||
/*
 | 
			
		||||
 * typedefs
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
typedef struct uglMesaContext * UGL_MESA_CONTEXT;
 | 
			
		||||
    
 | 
			
		||||
UGL_MESA_CONTEXT uglMesaCreateNewContext (GLenum mode,
 | 
			
		||||
					  UGL_MESA_CONTEXT share_list);
 | 
			
		||||
 | 
			
		||||
UGL_MESA_CONTEXT  uglMesaCreateNewContextExt (GLenum mode,
 | 
			
		||||
					      GLint depth_bits,
 | 
			
		||||
					      GLint stencil_bits,
 | 
			
		||||
					      GLint accum_red_bits,
 | 
			
		||||
					      GLint accum_green_bits,
 | 
			
		||||
					      GLint accum_blue_bits,
 | 
			
		||||
					      GLint accum_alpha_bits,
 | 
			
		||||
					      UGL_MESA_CONTEXT share_list);
 | 
			
		||||
 | 
			
		||||
GLboolean uglMesaMakeCurrentContext (UGL_MESA_CONTEXT umc,
 | 
			
		||||
				     GLsizei left, GLsizei top,
 | 
			
		||||
				     GLsizei width, GLsizei height);
 | 
			
		||||
 | 
			
		||||
GLboolean uglMesaMoveWindow (GLsizei dx, GLsizei dy);
 | 
			
		||||
 | 
			
		||||
GLboolean uglMesaMoveToWindow (GLsizei left, GLsizei top);
 | 
			
		||||
 | 
			
		||||
GLboolean uglMesaResizeWindow (GLsizei dw, GLsizei dh);
 | 
			
		||||
 | 
			
		||||
GLboolean uglMesaResizeToWindow (GLsizei width, GLsizei height);
 | 
			
		||||
 | 
			
		||||
void uglMesaDestroyContext (void);
 | 
			
		||||
 | 
			
		||||
UGL_MESA_CONTEXT uglMesaGetCurrentContext (void);
 | 
			
		||||
 | 
			
		||||
void uglMesaSwapBuffers (void);
 | 
			
		||||
 | 
			
		||||
void uglMesaPixelStore (GLint pname, GLint value);
 | 
			
		||||
 | 
			
		||||
void uglMesaGetIntegerv (GLint pname, GLint *value);
 | 
			
		||||
 | 
			
		||||
GLboolean uglMesaGetDepthBuffer (GLint *width, GLint *height,
 | 
			
		||||
				 GLint *bytesPerValue, void **buffer);
 | 
			
		||||
 | 
			
		||||
GLboolean uglMesaGetColorBuffer (GLint *width, GLint *height,
 | 
			
		||||
				 GLint *format, void **buffer);
 | 
			
		||||
 | 
			
		||||
GLboolean uglMesaSetColor (GLubyte index, GLfloat red,
 | 
			
		||||
			   GLfloat green, GLfloat blue);
 | 
			
		||||
  
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
							
								
								
									
										880
									
								
								include/GL/vms_x_fix.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										880
									
								
								include/GL/vms_x_fix.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,880 @@
 | 
			
		||||
/***************************************************************************
 | 
			
		||||
 *                                                                         *
 | 
			
		||||
 * Repair definitions of Xlib when compileing with /name=(as_is) on VMS    *
 | 
			
		||||
 *                                                                         *
 | 
			
		||||
 * Author : Jouk Jansen (joukj@hrem.stm.tudelft.nl)                        *
 | 
			
		||||
 *                                                                         *
 | 
			
		||||
 * Last revision : 22 August 2000                                          *
 | 
			
		||||
 *                                                                         *
 | 
			
		||||
 ***************************************************************************/
 | 
			
		||||
 | 
			
		||||
#ifndef VMS_X_FIX
 | 
			
		||||
#define VMS_X_FIX
 | 
			
		||||
 | 
			
		||||
#define _XRegisterFilterByType _XREGISTERFILTERBYTYPE 
 | 
			
		||||
#define XAllocClassHint XALLOCCLASSHINT
 | 
			
		||||
#define XAllocColor XALLOCCOLOR
 | 
			
		||||
#define XAllocColorCells XALLOCCOLORCELLS
 | 
			
		||||
#define XAllocSizeHints XALLOCSIZEHINTS
 | 
			
		||||
#define XAllocWMHints XALLOCWMHINTS
 | 
			
		||||
#define XAutoRepeatOff XAUTOREPEATOFF
 | 
			
		||||
#define XAutoRepeatOn XAUTOREPEATON
 | 
			
		||||
#define XBaseFontNameListOfFontSet XBASEFONTNAMELISTOFFONTSET
 | 
			
		||||
#define XBell XBELL
 | 
			
		||||
#define XBitmapPad XBITMAPPAD
 | 
			
		||||
#define XChangeActivePointerGrab XCHANGEACTIVEPOINTERGRAB
 | 
			
		||||
#define XChangeGC XCHANGEGC
 | 
			
		||||
#define XChangeProperty XCHANGEPROPERTY
 | 
			
		||||
#define XChangeWindowAttributes XCHANGEWINDOWATTRIBUTES
 | 
			
		||||
#define XCheckIfEvent XCHECKIFEVENT
 | 
			
		||||
#define XCheckMaskEvent XCHECKMASKEVENT
 | 
			
		||||
#define XCheckTypedWindowEvent XCHECKTYPEDWINDOWEVENT
 | 
			
		||||
#define XCheckWindowEvent XCHECKWINDOWEVENT
 | 
			
		||||
#define XClearArea XCLEARAREA
 | 
			
		||||
#define XClearWindow XCLEARWINDOW
 | 
			
		||||
#define XClipBox XCLIPBOX
 | 
			
		||||
#define XCloseDisplay XCLOSEDISPLAY
 | 
			
		||||
#define XCloseIM XCLOSEIM
 | 
			
		||||
#define XConfigureWindow XCONFIGUREWINDOW
 | 
			
		||||
#define XConvertSelection XCONVERTSELECTION
 | 
			
		||||
#define XCopyArea XCOPYAREA
 | 
			
		||||
#define XCopyGC XCOPYGC
 | 
			
		||||
#define XCopyPlane XCOPYPLANE
 | 
			
		||||
#define XCreateBitmapFromData XCREATEBITMAPFROMDATA
 | 
			
		||||
#define XCreateColormap XCREATECOLORMAP
 | 
			
		||||
#define XCreateFontCursor XCREATEFONTCURSOR
 | 
			
		||||
#define XCreateFontSet XCREATEFONTSET
 | 
			
		||||
#define XCreateGC XCREATEGC
 | 
			
		||||
#define XCreateIC XCREATEIC
 | 
			
		||||
#define XCreateImage XCREATEIMAGE
 | 
			
		||||
#define XCreatePixmap XCREATEPIXMAP
 | 
			
		||||
#define XCreatePixmapCursor XCREATEPIXMAPCURSOR
 | 
			
		||||
#define XCreatePixmapFromBitmapData XCREATEPIXMAPFROMBITMAPDATA
 | 
			
		||||
#define XCreateRegion XCREATEREGION
 | 
			
		||||
#define XCreateSimpleWindow XCREATESIMPLEWINDOW
 | 
			
		||||
#define XCreateWindow XCREATEWINDOW
 | 
			
		||||
#define XDefaultScreenOfDisplay XDEFAULTSCREENOFDISPLAY
 | 
			
		||||
#define XDefineCursor XDEFINECURSOR
 | 
			
		||||
#define XDeleteProperty XDELETEPROPERTY
 | 
			
		||||
#define XDestroyIC XDESTROYIC
 | 
			
		||||
#define XDestroyRegion XDESTROYREGION
 | 
			
		||||
#define XDestroyWindow XDESTROYWINDOW
 | 
			
		||||
#define XDisplayName XDISPLAYNAME
 | 
			
		||||
#define XDisplayOfScreen XDISPLAYOFSCREEN
 | 
			
		||||
#define XDrawArc XDRAWARC
 | 
			
		||||
#define XDrawImageString XDRAWIMAGESTRING
 | 
			
		||||
#define XDrawImageString16 XDRAWIMAGESTRING16
 | 
			
		||||
#define XDrawLine XDRAWLINE
 | 
			
		||||
#define XDrawLines XDRAWLINES
 | 
			
		||||
#define XDrawPoint XDRAWPOINT
 | 
			
		||||
#define XDrawPoints XDRAWPOINTS
 | 
			
		||||
#define XDrawRectangle XDRAWRECTANGLE
 | 
			
		||||
#define XDrawSegments XDRAWSEGMENTS
 | 
			
		||||
#define XDrawString XDRAWSTRING
 | 
			
		||||
#define XDrawString16 XDRAWSTRING16
 | 
			
		||||
#define XEmptyRegion XEMPTYREGION
 | 
			
		||||
#define XEqualRegion XEQUALREGION
 | 
			
		||||
#define XEventsQueued XEVENTSQUEUED
 | 
			
		||||
#define XExtentsOfFontSet XEXTENTSOFFONTSET
 | 
			
		||||
#define XFillArc XFILLARC
 | 
			
		||||
#define XFillPolygon XFILLPOLYGON
 | 
			
		||||
#define XFillRectangle XFILLRECTANGLE
 | 
			
		||||
#define XFillRectangles XFILLRECTANGLES
 | 
			
		||||
#define XFilterEvent XFILTEREVENT
 | 
			
		||||
#define XFlush XFLUSH
 | 
			
		||||
#define XFontsOfFontSet XFONTSOFFONTSET
 | 
			
		||||
#define XFree XFREE
 | 
			
		||||
#define XFreeColormap XFREECOLORMAP
 | 
			
		||||
#define XFreeColors XFREECOLORS
 | 
			
		||||
#define XFreeCursor XFREECURSOR
 | 
			
		||||
#define XFreeFont XFREEFONT
 | 
			
		||||
#define XFreeFontInfo XFREEFONTINFO
 | 
			
		||||
#define XFreeFontNames XFREEFONTNAMES
 | 
			
		||||
#define XFreeFontSet XFREEFONTSET
 | 
			
		||||
#define XFreeGC XFREEGC
 | 
			
		||||
#define XFreeModifiermap XFREEMODIFIERMAP
 | 
			
		||||
#define XFreePixmap XFREEPIXMAP
 | 
			
		||||
#define XFreeStringList XFREESTRINGLIST
 | 
			
		||||
#define XGetAtomName XGETATOMNAME
 | 
			
		||||
#define XGetDefault XGETDEFAULT
 | 
			
		||||
#define XGetErrorDatabaseText XGETERRORDATABASETEXT
 | 
			
		||||
#define XGetErrorText XGETERRORTEXT
 | 
			
		||||
#define XGetFontProperty XGETFONTPROPERTY
 | 
			
		||||
#define XGetGCValues XGETGCVALUES
 | 
			
		||||
#define XGetGeometry XGETGEOMETRY
 | 
			
		||||
#define XGetICValues XGETICVALUES
 | 
			
		||||
#define XGetIMValues XGETIMVALUES
 | 
			
		||||
#define XGetImage XGETIMAGE
 | 
			
		||||
#define XGetKeyboardControl XGETKEYBOARDCONTROL
 | 
			
		||||
#define XGetModifierMapping XGETMODIFIERMAPPING
 | 
			
		||||
#define XGetMotionEvents XGETMOTIONEVENTS
 | 
			
		||||
#define XGetNormalHints XGETNORMALHINTS
 | 
			
		||||
#define XGetSelectionOwner XGETSELECTIONOWNER
 | 
			
		||||
#define XGetSubImage XGETSUBIMAGE
 | 
			
		||||
#define XGetVisualInfo XGETVISUALINFO
 | 
			
		||||
#define XGetWMColormapWindows XGETWMCOLORMAPWINDOWS
 | 
			
		||||
#define XGetWMHints XGETWMHINTS
 | 
			
		||||
#define XGetWMName XGETWMNAME
 | 
			
		||||
#define XGetWMNormalHints XGETWMNORMALHINTS
 | 
			
		||||
#define XGetWindowAttributes XGETWINDOWATTRIBUTES
 | 
			
		||||
#define XGetWindowProperty XGETWINDOWPROPERTY
 | 
			
		||||
#define XGrabKeyboard XGRABKEYBOARD
 | 
			
		||||
#define XGrabPointer XGRABPOINTER
 | 
			
		||||
#define XGrabServer XGRABSERVER
 | 
			
		||||
#define XHeightOfScreen XHEIGHTOFSCREEN
 | 
			
		||||
#define XIfEvent XIFEVENT
 | 
			
		||||
#define XInternAtom XINTERNATOM
 | 
			
		||||
#define XIntersectRegion XINTERSECTREGION
 | 
			
		||||
#define XKeycodeToKeysym XKEYCODETOKEYSYM
 | 
			
		||||
#define XKeysymToKeycode XKEYSYMTOKEYCODE
 | 
			
		||||
#define XKeysymToString XKEYSYMTOSTRING
 | 
			
		||||
#define XListFonts XLISTFONTS
 | 
			
		||||
#define XListFontsWithInfo XLISTFONTSWITHINFO
 | 
			
		||||
#define XListPixmapFormats XLISTPIXMAPFORMATS
 | 
			
		||||
#define XListProperties XLISTPROPERTIES
 | 
			
		||||
#define XLoadQueryFont XLOADQUERYFONT
 | 
			
		||||
#define XLookupString XLOOKUPSTRING
 | 
			
		||||
#define XLowerWindow XLOWERWINDOW
 | 
			
		||||
#define XMapRaised XMAPRAISED
 | 
			
		||||
#define XMapWindow XMAPWINDOW
 | 
			
		||||
#define XMatchVisualInfo XMATCHVISUALINFO
 | 
			
		||||
#define XMoveResizeWindow XMOVERESIZEWINDOW
 | 
			
		||||
#define XMoveWindow XMOVEWINDOW
 | 
			
		||||
#define XNextEvent XNEXTEVENT
 | 
			
		||||
#define XOffsetRegion XOFFSETREGION
 | 
			
		||||
#define XOpenDisplay XOPENDISPLAY
 | 
			
		||||
#define XOpenIM XOPENIM
 | 
			
		||||
#define XParseColor XPARSECOLOR
 | 
			
		||||
#define XParseGeometry XPARSEGEOMETRY
 | 
			
		||||
#define XPeekEvent XPEEKEVENT
 | 
			
		||||
#define XPending XPENDING
 | 
			
		||||
#define XPointInRegion XPOINTINREGION
 | 
			
		||||
#define XPolygonRegion XPOLYGONREGION
 | 
			
		||||
#define XPutBackEvent XPUTBACKEVENT
 | 
			
		||||
#define XPutImage XPUTIMAGE
 | 
			
		||||
#define XQueryColor XQUERYCOLOR
 | 
			
		||||
#define XQueryColors XQUERYCOLORS
 | 
			
		||||
#define XQueryExtension XQUERYEXTENSION
 | 
			
		||||
#define XQueryPointer XQUERYPOINTER
 | 
			
		||||
#define XQueryTree XQUERYTREE
 | 
			
		||||
#define XRaiseWindow XRAISEWINDOW
 | 
			
		||||
#define XReconfigureWMWindow XRECONFIGUREWMWINDOW
 | 
			
		||||
#define XRectInRegion XRECTINREGION
 | 
			
		||||
#define XRefreshKeyboardMapping XREFRESHKEYBOARDMAPPING
 | 
			
		||||
#define XReparentWindow XREPARENTWINDOW
 | 
			
		||||
#define XResizeWindow XRESIZEWINDOW
 | 
			
		||||
#define XRestackWindows XRESTACKWINDOWS
 | 
			
		||||
#define XRootWindowOfScreen XROOTWINDOWOFSCREEN
 | 
			
		||||
#define XScreenNumberOfScreen XSCREENNUMBEROFSCREEN
 | 
			
		||||
#define XSelectAsyncEvent XSELECTASYNCEVENT
 | 
			
		||||
#define XSelectAsyncInput XSELECTASYNCINPUT
 | 
			
		||||
#define XSelectInput XSELECTINPUT
 | 
			
		||||
#define XSendEvent XSENDEVENT
 | 
			
		||||
#define XServerVendor XSERVERVENDOR
 | 
			
		||||
#define XSetBackground XSETBACKGROUND
 | 
			
		||||
#define XSetClassHint XSETCLASSHINT
 | 
			
		||||
#define XSetClipMask XSETCLIPMASK
 | 
			
		||||
#define XSetClipOrigin XSETCLIPORIGIN
 | 
			
		||||
#define XSetClipRectangles XSETCLIPRECTANGLES
 | 
			
		||||
#define XSetCloseDownMode XSETCLOSEDOWNMODE
 | 
			
		||||
#define XSetCommand XSETCOMMAND
 | 
			
		||||
#define XSetDashes XSETDASHES
 | 
			
		||||
#define XSetErrorHandler XSETERRORHANDLER
 | 
			
		||||
#define XSetFillStyle XSETFILLSTYLE
 | 
			
		||||
#define XSetFont XSETFONT
 | 
			
		||||
#define XSetForeground XSETFOREGROUND
 | 
			
		||||
#define XSetFunction XSETFUNCTION
 | 
			
		||||
#define XSetGraphicsExposures XSETGRAPHICSEXPOSURES
 | 
			
		||||
#define XSetICFocus XSETICFOCUS
 | 
			
		||||
#define XSetICValues XSETICVALUES
 | 
			
		||||
#define XSetIOErrorHandler XSETIOERRORHANDLER
 | 
			
		||||
#define XSetInputFocus XSETINPUTFOCUS
 | 
			
		||||
#define XSetLineAttributes XSETLINEATTRIBUTES
 | 
			
		||||
#define XSetLocaleModifiers XSETLOCALEMODIFIERS
 | 
			
		||||
#define XSetNormalHints XSETNORMALHINTS
 | 
			
		||||
#define XSetRegion XSETREGION
 | 
			
		||||
#define XSetSelectionOwner XSETSELECTIONOWNER
 | 
			
		||||
#define XSetStipple XSETSTIPPLE
 | 
			
		||||
#define XSetSubwindowMode XSETSUBWINDOWMODE
 | 
			
		||||
#define XSetTSOrigin XSETTSORIGIN
 | 
			
		||||
#define XSetTile XSETTILE
 | 
			
		||||
#define XSetTransientForHint XSETTRANSIENTFORHINT
 | 
			
		||||
#define XSetWMColormapWindows XSETWMCOLORMAPWINDOWS
 | 
			
		||||
#define XSetWMHints XSETWMHINTS
 | 
			
		||||
#define XSetWMIconName XSETWMICONNAME
 | 
			
		||||
#define XSetWMName XSETWMNAME
 | 
			
		||||
#define XSetWMNormalHints XSETWMNORMALHINTS
 | 
			
		||||
#define XSetWMProperties XSETWMPROPERTIES
 | 
			
		||||
#define XSetWMProtocols XSETWMPROTOCOLS
 | 
			
		||||
#define XSetWindowBackground XSETWINDOWBACKGROUND
 | 
			
		||||
#define XSetWindowBackgroundPixmap XSETWINDOWBACKGROUNDPIXMAP
 | 
			
		||||
#define XSetWindowColormap XSETWINDOWCOLORMAP
 | 
			
		||||
#define XShapeCombineMask XSHAPECOMBINEMASK
 | 
			
		||||
#define XShapeCombineRectangles XSHAPECOMBINERECTANGLES
 | 
			
		||||
#define XShapeGetRectangles XSHAPEGETRECTANGLES
 | 
			
		||||
#define XShrinkRegion XSHRINKREGION
 | 
			
		||||
#define XStoreColor XSTORECOLOR
 | 
			
		||||
#define XStoreColors XSTORECOLORS
 | 
			
		||||
#define XStoreName XSTORENAME
 | 
			
		||||
#define XStringToKeysym XSTRINGTOKEYSYM
 | 
			
		||||
#define XSubtractRegion XSUBTRACTREGION
 | 
			
		||||
#define XSupportsLocale XSUPPORTSLOCALE
 | 
			
		||||
#define XSync XSYNC
 | 
			
		||||
#define XSynchronize XSYNCHRONIZE
 | 
			
		||||
#define XTextExtents XTEXTEXTENTS
 | 
			
		||||
#define XTextExtents16 XTEXTEXTENTS16
 | 
			
		||||
#define XTextWidth XTEXTWIDTH
 | 
			
		||||
#define XTextWidth16 XTEXTWIDTH16
 | 
			
		||||
#define XTranslateCoordinates XTRANSLATECOORDINATES
 | 
			
		||||
#define XUndefineCursor XUNDEFINECURSOR
 | 
			
		||||
#define XUngrabKeyboard XUNGRABKEYBOARD
 | 
			
		||||
#define XUngrabPointer XUNGRABPOINTER
 | 
			
		||||
#define XUngrabServer XUNGRABSERVER
 | 
			
		||||
#define XUnionRectWithRegion XUNIONRECTWITHREGION
 | 
			
		||||
#define XUnionRegion XUNIONREGION
 | 
			
		||||
#define XUnmapWindow XUNMAPWINDOW
 | 
			
		||||
#define _XUnregisterFilter _XUNREGISTERFILTER
 | 
			
		||||
#define XUnsetICFocus XUNSETICFOCUS
 | 
			
		||||
#define XVaCreateNestedList XVACREATENESTEDLIST
 | 
			
		||||
#define XVisualIDFromVisual XVISUALIDFROMVISUAL
 | 
			
		||||
#define XWidthOfScreen XWIDTHOFSCREEN
 | 
			
		||||
#define XWindowEvent XWINDOWEVENT
 | 
			
		||||
#define XWithdrawWindow XWITHDRAWWINDOW
 | 
			
		||||
#define XXorRegion XXORREGION
 | 
			
		||||
#define XmAddProtocolCallback XMADDPROTOCOLCALLBACK
 | 
			
		||||
#define XmAddProtocols XMADDPROTOCOLS
 | 
			
		||||
#define XmChangeColor XMCHANGECOLOR
 | 
			
		||||
#define XmClipboardCopy XMCLIPBOARDCOPY
 | 
			
		||||
#define XmClipboardEndCopy XMCLIPBOARDENDCOPY
 | 
			
		||||
#define XmClipboardInquireLength XMCLIPBOARDINQUIRELENGTH
 | 
			
		||||
#define XmClipboardLock XMCLIPBOARDLOCK
 | 
			
		||||
#define XmClipboardRetrieve XMCLIPBOARDRETRIEVE
 | 
			
		||||
#define XmClipboardStartCopy XMCLIPBOARDSTARTCOPY
 | 
			
		||||
#define XmClipboardUnlock XMCLIPBOARDUNLOCK
 | 
			
		||||
#define XmCreateArrowButton XMCREATEARROWBUTTON
 | 
			
		||||
#define XmCreateArrowButtonGadget XMCREATEARROWBUTTONGADGET
 | 
			
		||||
#define XmCreateCascadeButton XMCREATECASCADEBUTTON
 | 
			
		||||
#define XmCreateDialogShell XMCREATEDIALOGSHELL
 | 
			
		||||
#define XmCreateDragIcon XMCREATEDRAGICON
 | 
			
		||||
#define XmCreateDrawingArea XMCREATEDRAWINGAREA
 | 
			
		||||
#define XmCreateDrawnButton XMCREATEDRAWNBUTTON
 | 
			
		||||
#define XmCreateFileSelectionBox XMCREATEFILESELECTIONBOX
 | 
			
		||||
#define XmCreateFileSelectionDialog XMCREATEFILESELECTIONDIALOG
 | 
			
		||||
#define XmCreateForm XMCREATEFORM
 | 
			
		||||
#define XmCreateFormDialog XMCREATEFORMDIALOG
 | 
			
		||||
#define XmCreateFrame XMCREATEFRAME
 | 
			
		||||
#define XmCreateInformationDialog XMCREATEINFORMATIONDIALOG
 | 
			
		||||
#define XmCreateLabelGadget XMCREATELABELGADGET
 | 
			
		||||
#define XmCreateMainWindow XMCREATEMAINWINDOW
 | 
			
		||||
#define XmCreateMenuBar XMCREATEMENUBAR
 | 
			
		||||
#define XmCreateMessageBox XMCREATEMESSAGEBOX
 | 
			
		||||
#define XmCreateMessageDialog XMCREATEMESSAGEDIALOG
 | 
			
		||||
#define XmCreateOptionMenu XMCREATEOPTIONMENU
 | 
			
		||||
#define XmCreatePanedWindow XMCREATEPANEDWINDOW
 | 
			
		||||
#define XmCreatePopupMenu XMCREATEPOPUPMENU
 | 
			
		||||
#define XmCreatePromptDialog XMCREATEPROMPTDIALOG
 | 
			
		||||
#define XmCreatePulldownMenu XMCREATEPULLDOWNMENU
 | 
			
		||||
#define XmCreatePushButton XMCREATEPUSHBUTTON
 | 
			
		||||
#define XmCreatePushButtonGadget XMCREATEPUSHBUTTONGADGET
 | 
			
		||||
#define XmCreateQuestionDialog XMCREATEQUESTIONDIALOG
 | 
			
		||||
#define XmCreateRadioBox XMCREATERADIOBOX
 | 
			
		||||
#define XmCreateRowColumn XMCREATEROWCOLUMN
 | 
			
		||||
#define XmCreateScale XMCREATESCALE
 | 
			
		||||
#define XmCreateScrollBar XMCREATESCROLLBAR
 | 
			
		||||
#define XmCreateScrolledList XMCREATESCROLLEDLIST
 | 
			
		||||
#define XmCreateScrolledText XMCREATESCROLLEDTEXT
 | 
			
		||||
#define XmCreateScrolledWindow XMCREATESCROLLEDWINDOW
 | 
			
		||||
#define XmCreateSelectionDialog XMCREATESELECTIONDIALOG
 | 
			
		||||
#define XmCreateSeparator XMCREATESEPARATOR
 | 
			
		||||
#define XmCreateSeparatorGadget XMCREATESEPARATORGADGET
 | 
			
		||||
#define XmCreateTemplateDialog XMCREATETEMPLATEDIALOG
 | 
			
		||||
#define XmCreateText XMCREATETEXT
 | 
			
		||||
#define XmCreateTextField XMCREATETEXTFIELD
 | 
			
		||||
#define XmCreateToggleButton XMCREATETOGGLEBUTTON
 | 
			
		||||
#define XmCreateToggleButtonGadget XMCREATETOGGLEBUTTONGADGET
 | 
			
		||||
#define XmDragStart XMDRAGSTART
 | 
			
		||||
#define XmDropSiteRegister XMDROPSITEREGISTER
 | 
			
		||||
#define XmDropSiteUnregister XMDROPSITEUNREGISTER
 | 
			
		||||
#define XmDropSiteUpdate XMDROPSITEUPDATE
 | 
			
		||||
#define XmDropTransferStart XMDROPTRANSFERSTART
 | 
			
		||||
#define XmFileSelectionBoxGetChild XMFILESELECTIONBOXGETCHILD
 | 
			
		||||
#define XmFileSelectionDoSearch XMFILESELECTIONDOSEARCH
 | 
			
		||||
#define XmFontListAppendEntry XMFONTLISTAPPENDENTRY
 | 
			
		||||
#define XmFontListCopy XMFONTLISTCOPY
 | 
			
		||||
#define XmFontListCreate XMFONTLISTCREATE
 | 
			
		||||
#define XmFontListEntryCreate XMFONTLISTENTRYCREATE
 | 
			
		||||
#define XmFontListEntryFree XMFONTLISTENTRYFREE
 | 
			
		||||
#define XmFontListEntryGetFont XMFONTLISTENTRYGETFONT
 | 
			
		||||
#define XmFontListEntryGetTag XMFONTLISTENTRYGETTAG
 | 
			
		||||
#define XmFontListEntryLoad XMFONTLISTENTRYLOAD
 | 
			
		||||
#define XmFontListFree XMFONTLISTFREE
 | 
			
		||||
#define XmFontListFreeFontContext XMFONTLISTFREEFONTCONTEXT
 | 
			
		||||
#define XmFontListGetNextFont XMFONTLISTGETNEXTFONT
 | 
			
		||||
#define XmFontListInitFontContext XMFONTLISTINITFONTCONTEXT
 | 
			
		||||
#define XmFontListNextEntry XMFONTLISTNEXTENTRY
 | 
			
		||||
#define XmGetColors XMGETCOLORS
 | 
			
		||||
#define XmGetFocusWidget XMGETFOCUSWIDGET
 | 
			
		||||
#define XmGetMenuCursor XMGETMENUCURSOR
 | 
			
		||||
#define XmGetPixmapByDepth XMGETPIXMAPBYDEPTH
 | 
			
		||||
#define XmGetTearOffControl XMGETTEAROFFCONTROL
 | 
			
		||||
#define XmGetXmDisplay XMGETXMDISPLAY
 | 
			
		||||
#define XmImMbLookupString XMIMMBLOOKUPSTRING
 | 
			
		||||
#define XmImRegister XMIMREGISTER
 | 
			
		||||
#define XmImSetFocusValues XMIMSETFOCUSVALUES
 | 
			
		||||
#define XmImSetValues XMIMSETVALUES
 | 
			
		||||
#define XmImUnregister XMIMUNREGISTER
 | 
			
		||||
#define XmImUnsetFocus XMIMUNSETFOCUS
 | 
			
		||||
#define XmInternAtom XMINTERNATOM
 | 
			
		||||
#define XmIsMotifWMRunning XMISMOTIFWMRUNNING
 | 
			
		||||
#define XmListAddItem XMLISTADDITEM
 | 
			
		||||
#define XmListAddItemUnselected XMLISTADDITEMUNSELECTED
 | 
			
		||||
#define XmListAddItemsUnselected XMLISTADDITEMSUNSELECTED
 | 
			
		||||
#define XmListDeleteAllItems XMLISTDELETEALLITEMS
 | 
			
		||||
#define XmListDeleteItemsPos XMLISTDELETEITEMSPOS
 | 
			
		||||
#define XmListDeletePos XMLISTDELETEPOS
 | 
			
		||||
#define XmListDeselectAllItems XMLISTDESELECTALLITEMS
 | 
			
		||||
#define XmListDeselectPos XMLISTDESELECTPOS
 | 
			
		||||
#define XmListGetKbdItemPos XMLISTGETKBDITEMPOS
 | 
			
		||||
#define XmListGetMatchPos XMLISTGETMATCHPOS
 | 
			
		||||
#define XmListGetSelectedPos XMLISTGETSELECTEDPOS
 | 
			
		||||
#define XmListPosSelected XMLISTPOSSELECTED
 | 
			
		||||
#define XmListSelectItem XMLISTSELECTITEM
 | 
			
		||||
#define XmListSelectPos XMLISTSELECTPOS
 | 
			
		||||
#define XmListSetBottomPos XMLISTSETBOTTOMPOS
 | 
			
		||||
#define XmListSetItem XMLISTSETITEM
 | 
			
		||||
#define XmListSetKbdItemPos XMLISTSETKBDITEMPOS
 | 
			
		||||
#define XmListSetPos XMLISTSETPOS
 | 
			
		||||
#define XmMainWindowSetAreas XMMAINWINDOWSETAREAS
 | 
			
		||||
#define XmMenuPosition XMMENUPOSITION
 | 
			
		||||
#define XmMessageBoxGetChild XMMESSAGEBOXGETCHILD
 | 
			
		||||
#define XmOptionButtonGadget XMOPTIONBUTTONGADGET
 | 
			
		||||
#define XmOptionLabelGadget XMOPTIONLABELGADGET
 | 
			
		||||
#define XmProcessTraversal XMPROCESSTRAVERSAL
 | 
			
		||||
#define XmQmotif XMQMOTIF
 | 
			
		||||
#define XmRemoveProtocolCallback XMREMOVEPROTOCOLCALLBACK
 | 
			
		||||
#define XmRepTypeGetId XMREPTYPEGETID
 | 
			
		||||
#define XmRepTypeGetRecord XMREPTYPEGETRECORD
 | 
			
		||||
#define XmRepTypeRegister XMREPTYPEREGISTER
 | 
			
		||||
#define XmRepTypeValidValue XMREPTYPEVALIDVALUE
 | 
			
		||||
#define XmScrollBarSetValues XMSCROLLBARSETVALUES
 | 
			
		||||
#define XmScrolledWindowSetAreas XMSCROLLEDWINDOWSETAREAS
 | 
			
		||||
#define XmSelectionBoxGetChild XMSELECTIONBOXGETCHILD
 | 
			
		||||
#define XmStringByteCompare XMSTRINGBYTECOMPARE
 | 
			
		||||
#define XmStringCompare XMSTRINGCOMPARE
 | 
			
		||||
#define XmStringConcat XMSTRINGCONCAT
 | 
			
		||||
#define XmStringCopy XMSTRINGCOPY
 | 
			
		||||
#define XmStringCreate XMSTRINGCREATE
 | 
			
		||||
#define XmStringCreateLocalized XMSTRINGCREATELOCALIZED
 | 
			
		||||
#define XmStringCreateLtoR XMSTRINGCREATELTOR
 | 
			
		||||
#define XmStringCreateSimple XMSTRINGCREATESIMPLE
 | 
			
		||||
#define XmStringDraw XMSTRINGDRAW
 | 
			
		||||
#define XmStringDrawUnderline XMSTRINGDRAWUNDERLINE
 | 
			
		||||
#define XmStringExtent XMSTRINGEXTENT
 | 
			
		||||
#define XmStringFree XMSTRINGFREE
 | 
			
		||||
#define XmStringFreeContext XMSTRINGFREECONTEXT
 | 
			
		||||
#define XmStringGetLtoR XMSTRINGGETLTOR
 | 
			
		||||
#define XmStringGetNextComponent XMSTRINGGETNEXTCOMPONENT
 | 
			
		||||
#define XmStringGetNextSegment XMSTRINGGETNEXTSEGMENT
 | 
			
		||||
#define XmStringInitContext XMSTRINGINITCONTEXT
 | 
			
		||||
#define XmStringLength XMSTRINGLENGTH
 | 
			
		||||
#define XmStringLtoRCreate XMSTRINGLTORCREATE
 | 
			
		||||
#define XmStringNConcat XMSTRINGNCONCAT
 | 
			
		||||
#define XmStringSegmentCreate XMSTRINGSEGMENTCREATE
 | 
			
		||||
#define XmStringWidth XMSTRINGWIDTH
 | 
			
		||||
#define XmTextClearSelection XMTEXTCLEARSELECTION
 | 
			
		||||
#define XmTextFieldGetEditable XMTEXTFIELDGETEDITABLE
 | 
			
		||||
#define XmTextFieldGetInsertionPosition XMTEXTFIELDGETINSERTIONPOSITION
 | 
			
		||||
#define XmTextFieldGetLastPosition XMTEXTFIELDGETLASTPOSITION
 | 
			
		||||
#define XmTextFieldGetSelection XMTEXTFIELDGETSELECTION
 | 
			
		||||
#define XmTextFieldGetString XMTEXTFIELDGETSTRING
 | 
			
		||||
#define XmTextFieldInsert XMTEXTFIELDINSERT
 | 
			
		||||
#define XmTextFieldRemove XMTEXTFIELDREMOVE
 | 
			
		||||
#define XmTextFieldSetSelection XMTEXTFIELDSETSELECTION
 | 
			
		||||
#define XmTextFieldSetString XMTEXTFIELDSETSTRING
 | 
			
		||||
#define XmTextGetCursorPosition XMTEXTGETCURSORPOSITION
 | 
			
		||||
#define XmTextGetInsertionPosition XMTEXTGETINSERTIONPOSITION
 | 
			
		||||
#define XmTextGetLastPosition XMTEXTGETLASTPOSITION
 | 
			
		||||
#define XmTextGetMaxLength XMTEXTGETMAXLENGTH
 | 
			
		||||
#define XmTextGetSelection XMTEXTGETSELECTION
 | 
			
		||||
#define XmTextGetSelectionPosition XMTEXTGETSELECTIONPOSITION
 | 
			
		||||
#define XmTextGetString XMTEXTGETSTRING
 | 
			
		||||
#define XmTextInsert XMTEXTINSERT
 | 
			
		||||
#define XmTextRemove XMTEXTREMOVE
 | 
			
		||||
#define XmTextReplace XMTEXTREPLACE
 | 
			
		||||
#define XmTextSetCursorPosition XMTEXTSETCURSORPOSITION
 | 
			
		||||
#define XmTextSetHighlight XMTEXTSETHIGHLIGHT
 | 
			
		||||
#define XmTextSetInsertionPosition XMTEXTSETINSERTIONPOSITION
 | 
			
		||||
#define XmTextSetSelection XMTEXTSETSELECTION
 | 
			
		||||
#define XmTextSetString XMTEXTSETSTRING
 | 
			
		||||
#define XmToggleButtonGadgetGetState XMTOGGLEBUTTONGADGETGETSTATE
 | 
			
		||||
#define XmToggleButtonGadgetSetState XMTOGGLEBUTTONGADGETSETSTATE
 | 
			
		||||
#define XmToggleButtonGetState XMTOGGLEBUTTONGETSTATE
 | 
			
		||||
#define XmToggleButtonSetState XMTOGGLEBUTTONSETSTATE
 | 
			
		||||
#define XmUpdateDisplay XMUPDATEDISPLAY
 | 
			
		||||
#define XmVaCreateSimpleRadioBox XMVACREATESIMPLERADIOBOX
 | 
			
		||||
#define XmbDrawString XMBDRAWSTRING
 | 
			
		||||
#define XmbLookupString XMBLOOKUPSTRING
 | 
			
		||||
#define XmbResetIC XMBRESETIC
 | 
			
		||||
#define XmbSetWMProperties XMBSETWMPROPERTIES
 | 
			
		||||
#define XmbTextEscapement XMBTEXTESCAPEMENT
 | 
			
		||||
#define XmbTextExtents XMBTEXTEXTENTS
 | 
			
		||||
#define XmbTextListToTextProperty XMBTEXTLISTTOTEXTPROPERTY
 | 
			
		||||
#define XmbTextPropertyToTextList XMBTEXTPROPERTYTOTEXTLIST
 | 
			
		||||
#define XmuClientWindow XMUCLIENTWINDOW
 | 
			
		||||
#define XmuPrintDefaultErrorMessage XMUPRINTDEFAULTERRORMESSAGE
 | 
			
		||||
#define XrmGetDatabase XRMGETDATABASE
 | 
			
		||||
#define XrmGetResource XRMGETRESOURCE
 | 
			
		||||
#define XrmPutStringResource XRMPUTSTRINGRESOURCE
 | 
			
		||||
#define XrmQuarkToString XRMQUARKTOSTRING
 | 
			
		||||
#define XrmStringToQuark XRMSTRINGTOQUARK
 | 
			
		||||
#define XtAddCallback XTADDCALLBACK
 | 
			
		||||
#define XtAddCallbacks XTADDCALLBACKS
 | 
			
		||||
#define XtAddEventHandler XTADDEVENTHANDLER
 | 
			
		||||
#define XtAddGrab XTADDGRAB
 | 
			
		||||
#define XtAllocateGC XTALLOCATEGC
 | 
			
		||||
#define XtAppAddActions XTAPPADDACTIONS
 | 
			
		||||
#define XtAppAddInput XTAPPADDINPUT
 | 
			
		||||
#define XtAppAddTimeOut XTAPPADDTIMEOUT
 | 
			
		||||
#define XtAppCreateShell XTAPPCREATESHELL
 | 
			
		||||
#define XtAppInitialize XTAPPINITIALIZE
 | 
			
		||||
#define XtAppNextEvent XTAPPNEXTEVENT
 | 
			
		||||
#define XtAppPeekEvent XTAPPPEEKEVENT
 | 
			
		||||
#define XtAppPending XTAPPPENDING
 | 
			
		||||
#define XtAppProcessEvent XTAPPPROCESSEVENT
 | 
			
		||||
#define XtAppSetErrorHandler XTAPPSETERRORHANDLER
 | 
			
		||||
#define XtAppSetFallbackResources XTAPPSETFALLBACKRESOURCES
 | 
			
		||||
#define XtAppSetWarningHandler XTAPPSETWARNINGHANDLER
 | 
			
		||||
#define XtAppSetWarningMsgHandler XTAPPSETWARNINGMSGHANDLER
 | 
			
		||||
#define XtAppWarning XTAPPWARNING
 | 
			
		||||
#define XtCallActionProc XTCALLACTIONPROC
 | 
			
		||||
#define XtCallCallbackList XTCALLCALLBACKLIST
 | 
			
		||||
#define XtCallCallbacks XTCALLCALLBACKS
 | 
			
		||||
#define XtConfigureWidget XTCONFIGUREWIDGET
 | 
			
		||||
#define XtConvertAndStore XTCONVERTANDSTORE
 | 
			
		||||
#define XtCreateApplicationContext XTCREATEAPPLICATIONCONTEXT
 | 
			
		||||
#define XtCreateManagedWidget XTCREATEMANAGEDWIDGET
 | 
			
		||||
#define XtCreatePopupShell XTCREATEPOPUPSHELL
 | 
			
		||||
#define XtCreateWidget XTCREATEWIDGET
 | 
			
		||||
#define XtDatabase XTDATABASE
 | 
			
		||||
#define XtDestroyWidget XTDESTROYWIDGET
 | 
			
		||||
#define XtDisownSelection XTDISOWNSELECTION
 | 
			
		||||
#define XtDispatchEvent XTDISPATCHEVENT
 | 
			
		||||
#define XtDisplayOfObject XTDISPLAYOFOBJECT
 | 
			
		||||
#define XtDisplayStringConvWarning XTDISPLAYSTRINGCONVWARNING
 | 
			
		||||
#define XtDisplayToApplicationContext XTDISPLAYTOAPPLICATIONCONTEXT
 | 
			
		||||
#define XtAppAddWorkProc XTAPPADDWORKPROC
 | 
			
		||||
#define XtRemoveWorkProc XTREMOVEWORKPROC
 | 
			
		||||
#define XtFree XTFREE
 | 
			
		||||
#define XtGetActionKeysym XTGETACTIONKEYSYM
 | 
			
		||||
#define XtGetActionList XTGETACTIONLIST
 | 
			
		||||
#define XtGetApplicationNameAndClass XTGETAPPLICATIONNAMEANDCLASS
 | 
			
		||||
#define XtGetApplicationResources XTGETAPPLICATIONRESOURCES
 | 
			
		||||
#define XtGetGC XTGETGC
 | 
			
		||||
#define XtGetMultiClickTime XTGETMULTICLICKTIME
 | 
			
		||||
#define XtGetSelectionValue XTGETSELECTIONVALUE
 | 
			
		||||
#define XtGetSelectionValues XTGETSELECTIONVALUES
 | 
			
		||||
#define XtGetSubresources XTGETSUBRESOURCES
 | 
			
		||||
#define XtGetValues XTGETVALUES
 | 
			
		||||
#define XtGrabKeyboard XTGRABKEYBOARD
 | 
			
		||||
#define XtGrabPointer XTGRABPOINTER
 | 
			
		||||
#define XtHasCallbacks XTHASCALLBACKS
 | 
			
		||||
#define XtInitializeWidgetClass XTINITIALIZEWIDGETCLASS
 | 
			
		||||
#define XtInsertEventHandler XTINSERTEVENTHANDLER
 | 
			
		||||
#define XtIsManaged XTISMANAGED
 | 
			
		||||
#define XtIsObject XTISOBJECT
 | 
			
		||||
#define XtIsSensitive XTISSENSITIVE
 | 
			
		||||
#define XtIsSubclass XTISSUBCLASS
 | 
			
		||||
#define XtLastTimestampProcessed XTLASTTIMESTAMPPROCESSED
 | 
			
		||||
#define XtMakeGeometryRequest XTMAKEGEOMETRYREQUEST
 | 
			
		||||
#define XtMakeResizeRequest XTMAKERESIZEREQUEST
 | 
			
		||||
#define XtMalloc XTMALLOC
 | 
			
		||||
#define XtManageChild XTMANAGECHILD
 | 
			
		||||
#define XtManageChildren XTMANAGECHILDREN
 | 
			
		||||
#define XtMergeArgLists XTMERGEARGLISTS
 | 
			
		||||
#define XtMoveWidget XTMOVEWIDGET
 | 
			
		||||
#define XtName XTNAME
 | 
			
		||||
#define XtNameToWidget XTNAMETOWIDGET
 | 
			
		||||
#define XtOpenDisplay XTOPENDISPLAY
 | 
			
		||||
#define XtOverrideTranslations XTOVERRIDETRANSLATIONS
 | 
			
		||||
#define XtOwnSelection XTOWNSELECTION
 | 
			
		||||
#define XtParseTranslationTable XTPARSETRANSLATIONTABLE
 | 
			
		||||
#define XtPopdown XTPOPDOWN
 | 
			
		||||
#define XtPopup XTPOPUP
 | 
			
		||||
#define XtQueryGeometry XTQUERYGEOMETRY
 | 
			
		||||
#define XtRealizeWidget XTREALIZEWIDGET
 | 
			
		||||
#define XtRealloc XTREALLOC
 | 
			
		||||
#define XtReleaseGC XTRELEASEGC
 | 
			
		||||
#define XtRemoveAllCallbacks XTREMOVEALLCALLBACKS
 | 
			
		||||
#define XtRemoveCallback XTREMOVECALLBACK
 | 
			
		||||
#define XtRemoveEventHandler XTREMOVEEVENTHANDLER
 | 
			
		||||
#define XtRemoveGrab XTREMOVEGRAB
 | 
			
		||||
#define XtRemoveInput XTREMOVEINPUT
 | 
			
		||||
#define XtRemoveTimeOut XTREMOVETIMEOUT
 | 
			
		||||
#define XtResizeWidget XTRESIZEWIDGET
 | 
			
		||||
#define XtResolvePathname XTRESOLVEPATHNAME
 | 
			
		||||
#define XtSetKeyboardFocus XTSETKEYBOARDFOCUS
 | 
			
		||||
#define XtSetMappedWhenManaged XTSETMAPPEDWHENMANAGED
 | 
			
		||||
#define XtSetSensitive XTSETSENSITIVE
 | 
			
		||||
#define XtSetTypeConverter XTSETTYPECONVERTER
 | 
			
		||||
#define XtSetValues XTSETVALUES
 | 
			
		||||
#define XtShellStrings XTSHELLSTRINGS
 | 
			
		||||
#define XtStrings XTSTRINGS
 | 
			
		||||
#define XtToolkitInitialize XTTOOLKITINITIALIZE
 | 
			
		||||
#define XtTranslateCoords XTTRANSLATECOORDS
 | 
			
		||||
#define XtTranslateKeycode XTTRANSLATEKEYCODE
 | 
			
		||||
#define XtUngrabKeyboard XTUNGRABKEYBOARD
 | 
			
		||||
#define XtUngrabPointer XTUNGRABPOINTER
 | 
			
		||||
#define XtUnmanageChild XTUNMANAGECHILD
 | 
			
		||||
#define XtUnmanageChildren XTUNMANAGECHILDREN
 | 
			
		||||
#define XtUnrealizeWidget XTUNREALIZEWIDGET
 | 
			
		||||
#define XtVaCreateManagedWidget XTVACREATEMANAGEDWIDGET
 | 
			
		||||
#define XtVaCreateWidget XTVACREATEWIDGET
 | 
			
		||||
#define XtVaGetValues XTVAGETVALUES
 | 
			
		||||
#define XtVaSetValues XTVASETVALUES
 | 
			
		||||
#define XtWarning XTWARNING
 | 
			
		||||
#define XtWidgetToApplicationContext XTWIDGETTOAPPLICATIONCONTEXT
 | 
			
		||||
#define XtWindowOfObject XTWINDOWOFOBJECT
 | 
			
		||||
#define XtWindowToWidget XTWINDOWTOWIDGET
 | 
			
		||||
#define XwcDrawString XWCDRAWSTRING
 | 
			
		||||
#define XwcFreeStringList XWCFREESTRINGLIST
 | 
			
		||||
#define XwcTextEscapement XWCTEXTESCAPEMENT
 | 
			
		||||
#define XwcTextExtents XWCTEXTEXTENTS
 | 
			
		||||
#define XwcTextListToTextProperty XWCTEXTLISTTOTEXTPROPERTY
 | 
			
		||||
#define XwcTextPropertyToTextList XWCTEXTPROPERTYTOTEXTLIST
 | 
			
		||||
#define _XmBottomShadowColorDefault _XMBOTTOMSHADOWCOLORDEFAULT
 | 
			
		||||
#define _XmClearBorder _XMCLEARBORDER
 | 
			
		||||
#define _XmConfigureObject _XMCONFIGUREOBJECT
 | 
			
		||||
#define _XmDestroyParentCallback _XMDESTROYPARENTCALLBACK
 | 
			
		||||
#define _XmDrawArrow _XMDRAWARROW
 | 
			
		||||
#define _XmDrawShadows _XMDRAWSHADOWS
 | 
			
		||||
#define _XmFontListGetDefaultFont _XMFONTLISTGETDEFAULTFONT
 | 
			
		||||
#define _XmFromHorizontalPixels _XMFROMHORIZONTALPIXELS
 | 
			
		||||
#define _XmFromVerticalPixels _XMFROMVERTICALPIXELS
 | 
			
		||||
#define _XmGetClassExtensionPtr _XMGETCLASSEXTENSIONPTR
 | 
			
		||||
#define _XmGetDefaultFontList _XMGETDEFAULTFONTLIST
 | 
			
		||||
#define _XmGetTextualDragIcon _XMGETTEXTUALDRAGICON
 | 
			
		||||
#define _XmGetWidgetExtData _XMGETWIDGETEXTDATA
 | 
			
		||||
#define _XmGrabKeyboard _XMGRABKEYBOARD
 | 
			
		||||
#define _XmGrabPointer _XMGRABPOINTER
 | 
			
		||||
#define _XmInheritClass _XMINHERITCLASS
 | 
			
		||||
#define _XmInputInGadget _XMINPUTINGADGET
 | 
			
		||||
#define _XmMakeGeometryRequest _XMMAKEGEOMETRYREQUEST
 | 
			
		||||
#define _XmMenuPopDown _XMMENUPOPDOWN
 | 
			
		||||
#define _XmMoveObject _XMMOVEOBJECT
 | 
			
		||||
#define _XmNavigChangeManaged _XMNAVIGCHANGEMANAGED
 | 
			
		||||
#define _XmOSBuildFileList _XMOSBUILDFILELIST
 | 
			
		||||
#define _XmOSFileCompare _XMOSFILECOMPARE
 | 
			
		||||
#define _XmOSFindPatternPart _XMOSFINDPATTERNPART
 | 
			
		||||
#define _XmOSQualifyFileSpec _XMOSQUALIFYFILESPEC
 | 
			
		||||
#define _XmPostPopupMenu _XMPOSTPOPUPMENU
 | 
			
		||||
#define _XmPrimitiveEnter _XMPRIMITIVEENTER
 | 
			
		||||
#define _XmPrimitiveLeave _XMPRIMITIVELEAVE
 | 
			
		||||
#define _XmRedisplayGadgets _XMREDISPLAYGADGETS
 | 
			
		||||
#define _XmShellIsExclusive _XMSHELLISEXCLUSIVE
 | 
			
		||||
#define _XmStringDraw _XMSTRINGDRAW
 | 
			
		||||
#define _XmStringGetTextConcat _XMSTRINGGETTEXTCONCAT
 | 
			
		||||
#define _XmStrings _XMSTRINGS
 | 
			
		||||
#define _XmToHorizontalPixels _XMTOHORIZONTALPIXELS
 | 
			
		||||
#define _XmToVerticalPixels _XMTOVERTICALPIXELS
 | 
			
		||||
#define _XmTopShadowColorDefault _XMTOPSHADOWCOLORDEFAULT
 | 
			
		||||
#define _Xm_fastPtr _XM_FASTPTR
 | 
			
		||||
#define _XtCheckSubclassFlag _XTCHECKSUBCLASSFLAG
 | 
			
		||||
#define _XtInherit _XTINHERIT
 | 
			
		||||
#define _XtInheritTranslations _XTINHERITTRANSLATIONS
 | 
			
		||||
#define applicationShellWidgetClass APPLICATIONSHELLWIDGETCLASS
 | 
			
		||||
#define compositeWidgetClass COMPOSITEWIDGETCLASS
 | 
			
		||||
#define overrideShellWidgetClass OVERRIDESHELLWIDGETCLASS
 | 
			
		||||
#define shellWidgetClass SHELLWIDGETCLASS
 | 
			
		||||
#define topLevelShellClassRec TOPLEVELSHELLCLASSREC
 | 
			
		||||
#define topLevelShellWidgetClass TOPLEVELSHELLWIDGETCLASS
 | 
			
		||||
#define transientShellWidgetClass TRANSIENTSHELLWIDGETCLASS
 | 
			
		||||
#define vendorShellClassRec VENDORSHELLCLASSREC
 | 
			
		||||
#define vendorShellWidgetClass VENDORSHELLWIDGETCLASS
 | 
			
		||||
#define wmShellWidgetClass WMSHELLWIDGETCLASS
 | 
			
		||||
#define xmArrowButtonWidgetClass XMARROWBUTTONWIDGETCLASS
 | 
			
		||||
#define xmCascadeButtonClassRec XMCASCADEBUTTONCLASSREC
 | 
			
		||||
#define xmCascadeButtonGadgetClass XMCASCADEBUTTONGADGETCLASS
 | 
			
		||||
#define xmCascadeButtonWidgetClass XMCASCADEBUTTONWIDGETCLASS
 | 
			
		||||
#define xmDialogShellWidgetClass XMDIALOGSHELLWIDGETCLASS
 | 
			
		||||
#define xmDrawingAreaWidgetClass XMDRAWINGAREAWIDGETCLASS
 | 
			
		||||
#define xmDrawnButtonWidgetClass XMDRAWNBUTTONWIDGETCLASS
 | 
			
		||||
#define xmFileSelectionBoxWidgetClass XMFILESELECTIONBOXWIDGETCLASS
 | 
			
		||||
#define xmFormWidgetClass XMFORMWIDGETCLASS
 | 
			
		||||
#define xmFrameWidgetClass XMFRAMEWIDGETCLASS
 | 
			
		||||
#define xmGadgetClass XMGADGETCLASS
 | 
			
		||||
#define xmLabelGadgetClass XMLABELGADGETCLASS
 | 
			
		||||
#define xmLabelWidgetClass XMLABELWIDGETCLASS
 | 
			
		||||
#define xmListWidgetClass XMLISTWIDGETCLASS
 | 
			
		||||
#define xmMainWindowWidgetClass XMMAINWINDOWWIDGETCLASS
 | 
			
		||||
#define xmManagerClassRec XMMANAGERCLASSREC
 | 
			
		||||
#define xmManagerWidgetClass XMMANAGERWIDGETCLASS
 | 
			
		||||
#define xmMenuShellWidgetClass XMMENUSHELLWIDGETCLASS
 | 
			
		||||
#define xmMessageBoxWidgetClass XMMESSAGEBOXWIDGETCLASS
 | 
			
		||||
#define xmPrimitiveClassRec XMPRIMITIVECLASSREC
 | 
			
		||||
#define xmPrimitiveWidgetClass XMPRIMITIVEWIDGETCLASS
 | 
			
		||||
#define xmPushButtonClassRec XMPUSHBUTTONCLASSREC
 | 
			
		||||
#define xmPushButtonGadgetClass XMPUSHBUTTONGADGETCLASS
 | 
			
		||||
#define xmPushButtonWidgetClass XMPUSHBUTTONWIDGETCLASS
 | 
			
		||||
#define xmRowColumnWidgetClass XMROWCOLUMNWIDGETCLASS
 | 
			
		||||
#define xmSashWidgetClass XMSASHWIDGETCLASS
 | 
			
		||||
#define xmScrollBarWidgetClass XMSCROLLBARWIDGETCLASS
 | 
			
		||||
#define xmScrolledWindowClassRec XMSCROLLEDWINDOWCLASSREC
 | 
			
		||||
#define xmScrolledWindowWidgetClass XMSCROLLEDWINDOWWIDGETCLASS
 | 
			
		||||
#define xmSeparatorGadgetClass XMSEPARATORGADGETCLASS
 | 
			
		||||
#define xmSeparatorWidgetClass XMSEPARATORWIDGETCLASS
 | 
			
		||||
#define xmTextFieldWidgetClass XMTEXTFIELDWIDGETCLASS
 | 
			
		||||
#define xmTextWidgetClass XMTEXTWIDGETCLASS
 | 
			
		||||
#define xmToggleButtonGadgetClass XMTOGGLEBUTTONGADGETCLASS
 | 
			
		||||
#define xmToggleButtonWidgetClass XMTOGGLEBUTTONWIDGETCLASS
 | 
			
		||||
#define XtRegisterDrawable _XTREGISTERWINDOW
 | 
			
		||||
#define XtUnregisterDrawable _XTUNREGISTERWINDOW
 | 
			
		||||
#define XQueryFont XQUERYFONT
 | 
			
		||||
#define XSetPlaneMask XSETPLANEMASK
 | 
			
		||||
#define XChangeKeyboardControl XCHANGEKEYBOARDCONTROL
 | 
			
		||||
#define XDestroySubwindows XDESTROYSUBWINDOWS
 | 
			
		||||
#define XFreeDeviceList XFREEDEVICELIST
 | 
			
		||||
#define XFreeDeviceState XFREEDEVICESTATE
 | 
			
		||||
#define XGetExtensionVersion XGETEXTENSIONVERSION
 | 
			
		||||
#define XGetRGBColormaps XGETRGBCOLORMAPS
 | 
			
		||||
#define XIconifyWindow XICONIFYWINDOW
 | 
			
		||||
#define XInstallColormap XINSTALLCOLORMAP
 | 
			
		||||
#define XListInputDevices XLISTINPUTDEVICES
 | 
			
		||||
#define XLookupKeysym XLOOKUPKEYSYM
 | 
			
		||||
#define XOpenDevice XOPENDEVICE
 | 
			
		||||
#define XQueryDeviceState XQUERYDEVICESTATE
 | 
			
		||||
#define XSelectExtensionEvent XSELECTEXTENSIONEVENT
 | 
			
		||||
#define XWarpPointer XWARPPOINTER
 | 
			
		||||
#define XmuLookupStandardColormap XMULOOKUPSTANDARDCOLORMAP
 | 
			
		||||
#define XAllocNamedColor XALLOCNAMEDCOLOR
 | 
			
		||||
#define XBlackPixelOfScreen XBLACKPIXELOFSCREEN
 | 
			
		||||
#define XDefaultColormap XDEFAULTCOLORMAP
 | 
			
		||||
#define XDefaultColormapOfScreen XDEFAULTCOLORMAPOFSCREEN
 | 
			
		||||
#define XDefaultDepth XDEFAULTDEPTH
 | 
			
		||||
#define XDefaultScreen XDEFAULTSCREEN
 | 
			
		||||
#define XDefaultVisual XDEFAULTVISUAL
 | 
			
		||||
#define XSetIconName XSETICONNAME
 | 
			
		||||
#define XtInitialize XTINITIALIZE
 | 
			
		||||
#define XtMainLoop XTMAINLOOP
 | 
			
		||||
#define DtSaverGetWindows DTSAVERGETWINDOWS
 | 
			
		||||
#define XAddHosts XADDHOSTS
 | 
			
		||||
#define XDisableAccessControl XDISABLEACCESSCONTROL
 | 
			
		||||
#define XEnableAccessControl XENABLEACCESSCONTROL
 | 
			
		||||
#define XFillArcs XFILLARCS
 | 
			
		||||
#define XForceScreenSaver XFORCESCREENSAVER
 | 
			
		||||
#define XGetScreenSaver XGETSCREENSAVER
 | 
			
		||||
#define XListHosts XLISTHOSTS
 | 
			
		||||
#define XReadBitmapFile XREADBITMAPFILE
 | 
			
		||||
#define XRemoveHosts XREMOVEHOSTS
 | 
			
		||||
#define XResetScreenSaver XRESETSCREENSAVER
 | 
			
		||||
#define XResourceManagerString XRESOURCEMANAGERSTRING
 | 
			
		||||
#define XSetScreenSaver XSETSCREENSAVER
 | 
			
		||||
#define XStringListToTextProperty XSTRINGLISTTOTEXTPROPERTY
 | 
			
		||||
#define XrmDestroyDatabase XRMDESTROYDATABASE
 | 
			
		||||
#define XrmGetFileDatabase XRMGETFILEDATABASE
 | 
			
		||||
#define XrmGetStringDatabase XRMGETSTRINGDATABASE
 | 
			
		||||
#define XrmInitialize XRMINITIALIZE
 | 
			
		||||
#define XrmMergeDatabases XRMMERGEDATABASES
 | 
			
		||||
#define XrmParseCommand XRMPARSECOMMAND
 | 
			
		||||
#define XrmPutLineResource XRMPUTLINERESOURCE
 | 
			
		||||
#define XrmQPutStringResource XRMQPUTSTRINGRESOURCE
 | 
			
		||||
#define XrmStringToBindingQuarkList XRMSTRINGTOBINDINGQUARKLIST
 | 
			
		||||
#define XrmStringToQuark XRMSTRINGTOQUARK
 | 
			
		||||
#define XmCreateLabel XMCREATELABEL
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
extern void XtFree(char*);
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define pthread_attr_create PTHREAD_ATTR_CREATE
 | 
			
		||||
#define pthread_attr_delete PTHREAD_ATTR_DELETE
 | 
			
		||||
#define pthread_attr_destroy PTHREAD_ATTR_DESTROY
 | 
			
		||||
#define pthread_attr_getdetach_np PTHREAD_ATTR_GETDETACH_NP
 | 
			
		||||
#define pthread_attr_getguardsize_np PTHREAD_ATTR_GETGUARDSIZE_NP
 | 
			
		||||
#define pthread_attr_getinheritsched PTHREAD_ATTR_GETINHERITSCHED
 | 
			
		||||
#define pthread_attr_getprio PTHREAD_ATTR_GETPRIO
 | 
			
		||||
#define pthread_attr_getsched PTHREAD_ATTR_GETSCHED
 | 
			
		||||
#define pthread_attr_getschedparam PTHREAD_ATTR_GETSCHEDPARAM
 | 
			
		||||
#define pthread_attr_getstacksize PTHREAD_ATTR_GETSTACKSIZE
 | 
			
		||||
#define pthread_attr_init PTHREAD_ATTR_INIT
 | 
			
		||||
#define pthread_attr_setdetach_np PTHREAD_ATTR_SETDETACH_NP
 | 
			
		||||
#define pthread_attr_setdetachstate PTHREAD_ATTR_SETDETACHSTATE
 | 
			
		||||
#define pthread_attr_setguardsize_np PTHREAD_ATTR_SETGUARDSIZE_NP
 | 
			
		||||
#define pthread_attr_setinheritsched PTHREAD_ATTR_SETINHERITSCHED
 | 
			
		||||
#define pthread_attr_setprio PTHREAD_ATTR_SETPRIO
 | 
			
		||||
#define pthread_attr_setsched PTHREAD_ATTR_SETSCHED
 | 
			
		||||
#define pthread_attr_setschedparam PTHREAD_ATTR_SETSCHEDPARAM
 | 
			
		||||
#define pthread_attr_setschedpolicy PTHREAD_ATTR_SETSCHEDPOLICY
 | 
			
		||||
#define pthread_attr_setstacksize PTHREAD_ATTR_SETSTACKSIZE
 | 
			
		||||
#define pthread_cancel PTHREAD_CANCEL
 | 
			
		||||
#define pthread_cancel_e PTHREAD_CANCEL_E
 | 
			
		||||
#define pthread_cond_broadcast PTHREAD_COND_BROADCAST
 | 
			
		||||
#define pthread_cond_destroy PTHREAD_COND_DESTROY
 | 
			
		||||
#define pthread_cond_init PTHREAD_COND_INIT
 | 
			
		||||
#define pthread_cond_sig_preempt_int_np PTHREAD_COND_SIG_PREEMPT_INT_NP
 | 
			
		||||
#define pthread_cond_signal PTHREAD_COND_SIGNAL
 | 
			
		||||
#define pthread_cond_signal_int_np PTHREAD_COND_SIGNAL_INT_NP
 | 
			
		||||
#define pthread_cond_timedwait PTHREAD_COND_TIMEDWAIT
 | 
			
		||||
#define pthread_cond_wait PTHREAD_COND_WAIT
 | 
			
		||||
#define pthread_condattr_create PTHREAD_CONDATTR_CREATE
 | 
			
		||||
#define pthread_condattr_delete PTHREAD_CONDATTR_DELETE
 | 
			
		||||
#define pthread_condattr_init PTHREAD_CONDATTR_INIT
 | 
			
		||||
#define pthread_create PTHREAD_CREATE
 | 
			
		||||
#define pthread_delay_np PTHREAD_DELAY_NP
 | 
			
		||||
#define pthread_detach PTHREAD_DETACH
 | 
			
		||||
#define pthread_equal PTHREAD_EQUAL
 | 
			
		||||
#define pthread_exc_fetch_fp_np PTHREAD_EXC_FETCH_FP_NP
 | 
			
		||||
#define pthread_exc_handler_np PTHREAD_EXC_HANDLER_NP
 | 
			
		||||
#define pthread_exc_pop_ctx_np PTHREAD_EXC_POP_CTX_NP
 | 
			
		||||
#define pthread_exc_push_ctx_np PTHREAD_EXC_PUSH_CTX_NP
 | 
			
		||||
#define pthread_exc_savecontext_np PTHREAD_EXC_SAVECONTEXT_NP
 | 
			
		||||
#define pthread_exit PTHREAD_EXIT
 | 
			
		||||
#define pthread_get_expiration_np PTHREAD_GET_EXPIRATION_NP
 | 
			
		||||
#define pthread_getprio PTHREAD_GETPRIO
 | 
			
		||||
#define pthread_getschedparam PTHREAD_GETSCHEDPARAM
 | 
			
		||||
#define pthread_getscheduler PTHREAD_GETSCHEDULER
 | 
			
		||||
#define pthread_getspecific PTHREAD_GETSPECIFIC
 | 
			
		||||
#define pthread_getunique_np PTHREAD_GETUNIQUE_NP
 | 
			
		||||
#define pthread_join PTHREAD_JOIN
 | 
			
		||||
#define pthread_join32 PTHREAD_JOIN32
 | 
			
		||||
#define pthread_keycreate PTHREAD_KEYCREATE
 | 
			
		||||
#define pthread_key_create PTHREAD_KEY_CREATE
 | 
			
		||||
#define pthread_kill PTHREAD_KILL
 | 
			
		||||
#define pthread_lock_global_np PTHREAD_LOCK_GLOBAL_NP
 | 
			
		||||
#define pthread_mutex_destroy PTHREAD_MUTEX_DESTROY
 | 
			
		||||
#define pthread_mutex_init PTHREAD_MUTEX_INIT
 | 
			
		||||
#define pthread_mutex_lock PTHREAD_MUTEX_LOCK
 | 
			
		||||
#define pthread_mutex_trylock PTHREAD_MUTEX_TRYLOCK
 | 
			
		||||
#define pthread_mutex_unlock PTHREAD_MUTEX_UNLOCK
 | 
			
		||||
#define pthread_mutexattr_create PTHREAD_MUTEXATTR_CREATE
 | 
			
		||||
#define pthread_mutexattr_delete PTHREAD_MUTEXATTR_DELETE
 | 
			
		||||
#define pthread_mutexattr_destroy PTHREAD_MUTEXATTR_DESTROY
 | 
			
		||||
#define pthread_mutexattr_getkind_np PTHREAD_MUTEXATTR_GETKIND_NP
 | 
			
		||||
#define pthread_mutexattr_init PTHREAD_MUTEXATTR_INIT
 | 
			
		||||
#define pthread_mutexattr_setkind_np PTHREAD_MUTEXATTR_SETKIND_NP
 | 
			
		||||
#define pthread_mutexattr_settype_np PTHREAD_MUTEXATTR_SETTYPE_NP
 | 
			
		||||
#define pthread_once PTHREAD_ONCE
 | 
			
		||||
#define pthread_resume_np PTHREAD_RESUME_NP
 | 
			
		||||
#define pthread_self PTHREAD_SELF
 | 
			
		||||
#define pthread_setasynccancel PTHREAD_SETASYNCCANCEL
 | 
			
		||||
#define pthread_setcancel PTHREAD_SETCANCEL
 | 
			
		||||
#define pthread_setcancelstate PTHREAD_SETCANCELSTATE
 | 
			
		||||
#define pthread_setprio PTHREAD_SETPRIO
 | 
			
		||||
#define pthread_setschedparam PTHREAD_SETSCHEDPARAM
 | 
			
		||||
#define pthread_setscheduler PTHREAD_SETSCHEDULER
 | 
			
		||||
#define pthread_setspecific PTHREAD_SETSPECIFIC
 | 
			
		||||
#define pthread_suspend_np PTHREAD_SUSPEND_NP
 | 
			
		||||
#define pthread_testcancel PTHREAD_TESTCANCEL
 | 
			
		||||
#define pthread_unlock_global_np PTHREAD_UNLOCK_GLOBAL_NP
 | 
			
		||||
#define pthread_yield PTHREAD_YIELD
 | 
			
		||||
#define pthread_yield_np PTHREAD_YIELD_NP
 | 
			
		||||
#define XDefaultRootWindow XDEFAULTROOTWINDOW
 | 
			
		||||
#define XDisplayCells XDISPLAYCELLS
 | 
			
		||||
#define XMaxRequestSize XMAXREQUESTSIZE
 | 
			
		||||
#define XScreenOfDisplay XSCREENOFDISPLAY
 | 
			
		||||
#define XSetFillRule XSETFILLRULE
 | 
			
		||||
#define XmActivateProtocol XMACTIVATEPROTOCOL
 | 
			
		||||
#define XmCreateBulletinBoardDialog XMCREATEBULLETINBOARDDIALOG
 | 
			
		||||
#define XmCreateErrorDialog XMCREATEERRORDIALOG
 | 
			
		||||
#define XmCreateWarningDialog XMCREATEWARNINGDIALOG
 | 
			
		||||
#define XmCvtCTToXmString XMCVTCTTOXMSTRING
 | 
			
		||||
#define XmDestroyPixmap XMDESTROYPIXMAP
 | 
			
		||||
#define XmGetPixmap XMGETPIXMAP
 | 
			
		||||
#define XmInstallImage XMINSTALLIMAGE
 | 
			
		||||
#define XmListAddItems XMLISTADDITEMS
 | 
			
		||||
#define XmListDeleteItem XMLISTDELETEITEM
 | 
			
		||||
#define XmListItemExists XMLISTITEMEXISTS
 | 
			
		||||
#define XmListItemPos XMLISTITEMPOS
 | 
			
		||||
#define XmListReplaceItems XMLISTREPLACEITEMS
 | 
			
		||||
#define XmListReplaceItemsPos XMLISTREPLACEITEMSPOS
 | 
			
		||||
#define XmRemoveProtocols XMREMOVEPROTOCOLS
 | 
			
		||||
#define XmRemoveTabGroup XMREMOVETABGROUP
 | 
			
		||||
#define XmSetColorCalculation XMSETCOLORCALCULATION
 | 
			
		||||
#define XmTextCopy XMTEXTCOPY
 | 
			
		||||
#define XmTextCut XMTEXTCUT
 | 
			
		||||
#define XmTextFieldClearSelection XMTEXTFIELDCLEARSELECTION
 | 
			
		||||
#define XmTextFieldCopy XMTEXTFIELDCOPY
 | 
			
		||||
#define XmTextFieldCut XMTEXTFIELDCUT
 | 
			
		||||
#define XmTextFieldGetMaxLength XMTEXTFIELDGETMAXLENGTH
 | 
			
		||||
#define XmTextFieldGetSelectionPosition XMTEXTFIELDGETSELECTIONPOSITION
 | 
			
		||||
#define XmTextFieldPaste XMTEXTFIELDPASTE
 | 
			
		||||
#define XmTextFieldReplace XMTEXTFIELDREPLACE
 | 
			
		||||
#define XmTextFieldSetAddMode XMTEXTFIELDSETADDMODE
 | 
			
		||||
#define XmTextFieldSetHighlight XMTEXTFIELDSETHIGHLIGHT
 | 
			
		||||
#define XmTextFieldSetInsertionPosition XMTEXTFIELDSETINSERTIONPOSITION
 | 
			
		||||
#define XmTextFieldSetMaxLength XMTEXTFIELDSETMAXLENGTH
 | 
			
		||||
#define XmTextFieldShowPosition XMTEXTFIELDSHOWPOSITION
 | 
			
		||||
#define XmTextGetEditable XMTEXTGETEDITABLE
 | 
			
		||||
#define XmTextPaste XMTEXTPASTE
 | 
			
		||||
#define XmTextPosToXY XMTEXTPOSTOXY
 | 
			
		||||
#define XmTextSetEditable XMTEXTSETEDITABLE
 | 
			
		||||
#define XmTextShowPosition XMTEXTSHOWPOSITION
 | 
			
		||||
#define XmUninstallImage XMUNINSTALLIMAGE
 | 
			
		||||
#define XmuCvtStringToBitmap XMUCVTSTRINGTOBITMAP
 | 
			
		||||
#define XrmPutFileDatabase XRMPUTFILEDATABASE
 | 
			
		||||
#define XtAddConverter XTADDCONVERTER
 | 
			
		||||
#define XtError XTERROR
 | 
			
		||||
#define XtVaCreatePopupShell XTVACREATEPOPUPSHELL
 | 
			
		||||
#define pthread_attr_getschedpolicy PTHREAD_ATTR_GETSCHEDPOLICY
 | 
			
		||||
#define pthread_key_delete PTHREAD_KEY_DELETE
 | 
			
		||||
#define xmBulletinBoardWidgetClass XMBULLETINBOARDWIDGETCLASS
 | 
			
		||||
#define xmScaleWidgetClass XMSCALEWIDGETCLASS
 | 
			
		||||
#define XtDisplay XTDISPLAY
 | 
			
		||||
#define XtScreen XTSCREEN
 | 
			
		||||
#define XAllocIconSize XALLOCICONSIZE
 | 
			
		||||
#define XAllocStandardColormap XALLOCSTANDARDCOLORMAP
 | 
			
		||||
#define XAllowEvents XALLOWEVENTS
 | 
			
		||||
#define XBlackPixel XBLACKPIXEL
 | 
			
		||||
#define XCopyColormapAndFree XCOPYCOLORMAPANDFREE
 | 
			
		||||
#define XDefaultGC XDEFAULTGC
 | 
			
		||||
#define XDisplayHeight XDISPLAYHEIGHT
 | 
			
		||||
#define XDisplayWidth XDISPLAYWIDTH
 | 
			
		||||
#define XGetCommand XGETCOMMAND
 | 
			
		||||
#define XGetIconSizes XGETICONSIZES
 | 
			
		||||
#define XKillClient XKILLCLIENT
 | 
			
		||||
#define XListInstalledColormaps XLISTINSTALLEDCOLORMAPS
 | 
			
		||||
#define XRootWindow XROOTWINDOW
 | 
			
		||||
#define XWMGeometry XWMGEOMETRY
 | 
			
		||||
#define XWhitePixel XWHITEPIXEL
 | 
			
		||||
#define XrmCombineDatabase XRMCOMBINEDATABASE
 | 
			
		||||
#define XrmCombineFileDatabase XRMCOMBINEFILEDATABASE
 | 
			
		||||
#define XSetStandardProperties XSETSTANDARDPROPERTIES
 | 
			
		||||
#define XSetState XSETSTATE
 | 
			
		||||
#define XDrawRectangles XDRAWRECTANGLES
 | 
			
		||||
#define XGrabButton XGRABBUTTON
 | 
			
		||||
#define XLookupColor XLOOKUPCOLOR
 | 
			
		||||
#define XMapSubwindows XMAPSUBWINDOWS
 | 
			
		||||
#define XRecolorCursor XRECOLORCURSOR
 | 
			
		||||
#define XStoreBytes XSTOREBYTES
 | 
			
		||||
#define XUngrabButton XUNGRABBUTTON
 | 
			
		||||
#define XUninstallColormap XUNINSTALLCOLORMAP
 | 
			
		||||
#define lib$wait LIB$WAIT
 | 
			
		||||
#define lib$find_file LIB$FIND_FILE
 | 
			
		||||
#define lib$find_file_end LIB$FIND_FILE_END
 | 
			
		||||
#define lib$set_symbol LIB$SET_SYMBOL
 | 
			
		||||
#define lib$sfree1_dd LIB$SFREE1_DD
 | 
			
		||||
#define lib$spawn LIB$SPAWN
 | 
			
		||||
#define sys$assign SYS$ASSIGN
 | 
			
		||||
#define sys$crembx SYS$CREMBX
 | 
			
		||||
#define sys$dassgn SYS$DASSGN
 | 
			
		||||
#define sys$dclexh SYS$DCLEXH
 | 
			
		||||
#define sys$getdviw SYS$GETDVIW
 | 
			
		||||
#define sys$getsyiw SYS$GETSYIW
 | 
			
		||||
#define sys$qio SYS$QIO
 | 
			
		||||
#define sys$qiow SYS$QIOW
 | 
			
		||||
#define sys$setef SYS$SETEF
 | 
			
		||||
#define sys$synch SYS$SYNCH
 | 
			
		||||
#define XDrawText XDRAWTEXT
 | 
			
		||||
#define XtCloseDisplay XTCLOSEDISPLAY
 | 
			
		||||
#define XtDestroyApplicationContext XTDESTROYAPPLICATIONCONTEXT
 | 
			
		||||
#define lib$ediv LIB$EDIV
 | 
			
		||||
#define lib$subx LIB$SUBX
 | 
			
		||||
#define sys$bintim SYS$BINTIM
 | 
			
		||||
#define sys$gettim SYS$GETTIM
 | 
			
		||||
#define XFetchName XFETCHNAME
 | 
			
		||||
#define XPeekIfEvent XPEEKIFEVENT
 | 
			
		||||
#define XQueryKeymap XQUERYKEYMAP
 | 
			
		||||
#endif
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: wmesa.h,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
 | 
			
		||||
/* $Id: wmesa.h,v 1.1.1.1.8.1 2002/04/23 18:24:41 kschultz Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -24,8 +24,17 @@
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: wmesa.h,v $
 | 
			
		||||
 * Revision 1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Initial revision
 | 
			
		||||
 * Revision 1.1.1.1.8.1  2002/04/23 18:24:41  kschultz
 | 
			
		||||
 * Fix up alpha buffer handling for Windows.
 | 
			
		||||
 * - add two new Pixel Format Descriptors that do not have alpha bits to
 | 
			
		||||
 * mirror the two that do.
 | 
			
		||||
 * - add logic to wglChoosePixelFormat to match PFD's with respect to alpha.
 | 
			
		||||
 * - Create/clear software alpha buffer as required.
 | 
			
		||||
 * Now a wgl or GLUT program can control the creation of a software alpha
 | 
			
		||||
 * buffer via the PFD or GLUT parms, respectively.
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.1.1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Imported sources
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.2  1999/01/03 02:54:45  brianp
 | 
			
		||||
 * updated per Ted Jump
 | 
			
		||||
@@ -101,13 +110,17 @@ typedef struct wmesa_context *WMesaContext;
 | 
			
		||||
 *                    GL_FALSE = color index mode
 | 
			
		||||
 *         db_flag - GL_TRUE = double-buffered,
 | 
			
		||||
 *                   GL_FALSE = single buffered
 | 
			
		||||
 *         alpha_flag - GL_TRUE = create software alpha buffer,
 | 
			
		||||
 *                      GL_FALSE = no software alpha buffer
 | 
			
		||||
 *
 | 
			
		||||
 * Note: Indexed mode requires double buffering under Windows.
 | 
			
		||||
 *
 | 
			
		||||
 * Return:  a WMesa_context or NULL if error.
 | 
			
		||||
 */
 | 
			
		||||
extern WMesaContext WMesaCreateContext(HWND hWnd,HPALETTE* pPal,
 | 
			
		||||
                                       GLboolean rgb_flag,GLboolean db_flag);
 | 
			
		||||
                                       GLboolean rgb_flag,
 | 
			
		||||
                                       GLboolean db_flag,
 | 
			
		||||
                                       GLboolean alpha_flag);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
/* $Id: xmesa.h,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
 | 
			
		||||
/* $Id: xmesa.h,v 1.12.2.2 2002/04/26 13:53:09 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.1
 | 
			
		||||
 * Version:  4.0.3
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (C) 1999  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * Copyright (C) 1999-2003  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * 
 | 
			
		||||
 * Permission is hereby granted, free of charge, to any person obtaining a
 | 
			
		||||
 * copy of this software and associated documentation files (the "Software"),
 | 
			
		||||
@@ -25,23 +25,6 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: xmesa.h,v $
 | 
			
		||||
 * Revision 1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Initial revision
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.3  1999/02/24 22:43:27  jens
 | 
			
		||||
 * Name changes to get XMesa to compile standalone inside XFree86
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.2  1999/02/14 03:39:09  brianp
 | 
			
		||||
 * new copyright
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.1  1998/02/13 03:17:32  brianp
 | 
			
		||||
 * Initial revision
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa/X11 interface.  This header file serves as the documentation for
 | 
			
		||||
 * the Mesa/X11 interface functions.
 | 
			
		||||
@@ -75,7 +58,6 @@ and create a window, you must do the following to use the X/Mesa interface:
 | 
			
		||||
 | 
			
		||||
8. Before exiting, call XMesaDestroyVisual and XMesaDestroyContext.
 | 
			
		||||
 | 
			
		||||
See the demos/xdemo.c and xmesa1.c files for examples.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -84,12 +66,14 @@ See the demos/xdemo.c and xmesa1.c files for examples.
 | 
			
		||||
#ifndef XMESA_H
 | 
			
		||||
#define XMESA_H
 | 
			
		||||
 | 
			
		||||
#ifdef __VMS
 | 
			
		||||
#include <GL/vms_x_fix.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef XFree86Server
 | 
			
		||||
#include "xmesa_xf86.h"
 | 
			
		||||
#else
 | 
			
		||||
@@ -105,7 +89,7 @@ extern struct Library *XLibBase;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define XMESA_MAJOR_VERSION 3
 | 
			
		||||
#define XMESA_MAJOR_VERSION 4
 | 
			
		||||
#define XMESA_MINOR_VERSION 0
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -133,7 +117,6 @@ typedef struct xmesa_buffer *XMesaBuffer;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Create a new X/Mesa visual.
 | 
			
		||||
 * Input:  display - X11 display
 | 
			
		||||
@@ -144,24 +127,35 @@ typedef struct xmesa_buffer *XMesaBuffer;
 | 
			
		||||
 *         db_flag - GL_TRUE = double-buffered,
 | 
			
		||||
 *                   GL_FALSE = single buffered
 | 
			
		||||
 *         stereo_flag - stereo visual?
 | 
			
		||||
 *         depth_size - requested bits/depth values, or zero
 | 
			
		||||
 *         stencil_size - requested bits/stencil values, or zero
 | 
			
		||||
 *         accum_size - requested bits/component values, or zero
 | 
			
		||||
 *         ximage_flag - GL_TRUE = use an XImage for back buffer,
 | 
			
		||||
 *                       GL_FALSE = use an off-screen pixmap for back buffer
 | 
			
		||||
 *         depth_size - requested bits/depth values, or zero
 | 
			
		||||
 *         stencil_size - requested bits/stencil values, or zero
 | 
			
		||||
 *         accum_red_size - requested bits/red accum values, or zero
 | 
			
		||||
 *         accum_green_size - requested bits/green accum values, or zero
 | 
			
		||||
 *         accum_blue_size - requested bits/blue accum values, or zero
 | 
			
		||||
 *         accum_alpha_size - requested bits/alpha accum values, or zero
 | 
			
		||||
 *         num_samples - number of samples/pixel if multisampling, or zero
 | 
			
		||||
 *         level - visual level, usually 0
 | 
			
		||||
 *         visualCaveat - ala the GLX extension, usually GLX_NONE_EXT
 | 
			
		||||
 * Return;  a new XMesaVisual or 0 if error.
 | 
			
		||||
 */
 | 
			
		||||
extern XMesaVisual XMesaCreateVisual( XMesaDisplay *display,
 | 
			
		||||
				      XMesaVisualInfo visinfo,
 | 
			
		||||
				      GLboolean rgb_flag,
 | 
			
		||||
				      GLboolean alpha_flag,
 | 
			
		||||
				      GLboolean db_flag,
 | 
			
		||||
				      GLboolean stereo_flag,
 | 
			
		||||
				      GLboolean ximage_flag,
 | 
			
		||||
				      GLint depth_size,
 | 
			
		||||
				      GLint stencil_size,
 | 
			
		||||
				      GLint accum_size,
 | 
			
		||||
				      GLint level );
 | 
			
		||||
                                      XMesaVisualInfo visinfo,
 | 
			
		||||
                                      GLboolean rgb_flag,
 | 
			
		||||
                                      GLboolean alpha_flag,
 | 
			
		||||
                                      GLboolean db_flag,
 | 
			
		||||
                                      GLboolean stereo_flag,
 | 
			
		||||
                                      GLboolean ximage_flag,
 | 
			
		||||
                                      GLint depth_size,
 | 
			
		||||
                                      GLint stencil_size,
 | 
			
		||||
                                      GLint accum_red_size,
 | 
			
		||||
                                      GLint accum_green_size,
 | 
			
		||||
                                      GLint accum_blue_size,
 | 
			
		||||
                                      GLint accum_alpha_size,
 | 
			
		||||
                                      GLint num_samples,
 | 
			
		||||
                                      GLint level,
 | 
			
		||||
                                      GLint visualCaveat );
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Destroy an XMesaVisual, but not the associated XVisualInfo.
 | 
			
		||||
@@ -191,8 +185,7 @@ extern void XMesaDestroyContext( XMesaContext c );
 | 
			
		||||
/*
 | 
			
		||||
 * Create an XMesaBuffer from an X window.
 | 
			
		||||
 */
 | 
			
		||||
extern XMesaBuffer XMesaCreateWindowBuffer( XMesaVisual v,
 | 
			
		||||
					    XMesaWindow w );
 | 
			
		||||
extern XMesaBuffer XMesaCreateWindowBuffer( XMesaVisual v, XMesaWindow w );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
@@ -226,6 +219,22 @@ extern GLboolean XMesaMakeCurrent( XMesaContext c,
 | 
			
		||||
				   XMesaBuffer b );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Bind two buffers (read and draw) to a context and make the
 | 
			
		||||
 * context the current one.
 | 
			
		||||
 * New in Mesa 3.3
 | 
			
		||||
 */
 | 
			
		||||
extern GLboolean XMesaMakeCurrent2( XMesaContext c,
 | 
			
		||||
                                    XMesaBuffer drawBuffer,
 | 
			
		||||
                                    XMesaBuffer readBuffer );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Unbind the current context from its buffer.
 | 
			
		||||
 */
 | 
			
		||||
extern GLboolean XMesaUnbindContext( XMesaContext c );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Return a handle to the current context.
 | 
			
		||||
 */
 | 
			
		||||
@@ -233,11 +242,18 @@ extern XMesaContext XMesaGetCurrentContext( void );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Return handle to the current buffer.
 | 
			
		||||
 * Return handle to the current (draw) buffer.
 | 
			
		||||
 */
 | 
			
		||||
extern XMesaBuffer XMesaGetCurrentBuffer( void );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Return handle to the current read buffer.
 | 
			
		||||
 * New in Mesa 3.3
 | 
			
		||||
 */
 | 
			
		||||
extern XMesaBuffer XMesaGetCurrentReadBuffer( void );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Swap the front and back buffers for the given buffer.  No action is
 | 
			
		||||
 * taken if the buffer is not double buffered.
 | 
			
		||||
@@ -349,6 +365,15 @@ extern GLboolean XMesaSetFXmode( GLint mode );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Reallocate the back/depth/stencil/accum/etc/ buffers associated with
 | 
			
		||||
 * buffer <b> if its size has changed.
 | 
			
		||||
 *
 | 
			
		||||
 * New in Mesa 4.0.2
 | 
			
		||||
 */
 | 
			
		||||
extern void XMesaResizeBuffers( XMesaBuffer b );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -30,7 +30,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
 * Authors:
 | 
			
		||||
 *   Kevin E. Martin <kevin@precisioninsight.com>
 | 
			
		||||
 *
 | 
			
		||||
 * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/include/GL/xmesa_x.h,v 1.1 1999/08/19 00:55:40 jtg Exp $
 | 
			
		||||
 * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/include/GL/xmesa_x.h,v 1.2 2000/02/25 20:31:11 brianp Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef _XMESA_X_H_
 | 
			
		||||
@@ -78,7 +78,6 @@ typedef XColor       XMesaColor;
 | 
			
		||||
#define GET_REDMASK(__v)        __v->visinfo->red_mask
 | 
			
		||||
#define GET_GREENMASK(__v)      __v->visinfo->green_mask
 | 
			
		||||
#define GET_BLUEMASK(__v)       __v->visinfo->blue_mask
 | 
			
		||||
#define GET_BITS_PER_PIXEL(__v) bits_per_pixel(__v->display, __v->visinfo)
 | 
			
		||||
#if defined(__cplusplus) || defined(c_plusplus)
 | 
			
		||||
#define GET_VISUAL_CLASS(__v)   __v->visinfo->c_class
 | 
			
		||||
#else
 | 
			
		||||
 
 | 
			
		||||
@@ -30,7 +30,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
 * Authors:
 | 
			
		||||
 *   Kevin E. Martin <kevin@precisioninsight.com>
 | 
			
		||||
 *
 | 
			
		||||
 * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/include/GL/xmesa_xf86.h,v 1.1 1999/08/19 00:55:40 jtg Exp $
 | 
			
		||||
 * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/include/GL/xmesa_xf86.h,v 1.5 2000/04/05 22:09:10 brianp Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef _XMESA_XF86_H_
 | 
			
		||||
@@ -52,29 +52,29 @@ typedef DDXPointRec XMesaPoint;
 | 
			
		||||
typedef xColorItem  XMesaColor;
 | 
			
		||||
 | 
			
		||||
#define XMesaSetGeneric(__d,__gc,__val,__mask) \
 | 
			
		||||
{ \
 | 
			
		||||
do { \
 | 
			
		||||
    CARD32 __v[1]; \
 | 
			
		||||
    (void) __d; \
 | 
			
		||||
    __v[0] = __val; \
 | 
			
		||||
    dixChangeGC(NullClient, __gc, __mask, __v, NULL); \
 | 
			
		||||
}
 | 
			
		||||
} while (0)
 | 
			
		||||
 | 
			
		||||
#define XMesaSetGenericPtr(__d,__gc,__pval,__mask) \
 | 
			
		||||
{ \
 | 
			
		||||
do { \
 | 
			
		||||
    ChangeGCVal __v[1]; \
 | 
			
		||||
    (void) __d; \
 | 
			
		||||
    __v[0].ptr = __pval; \
 | 
			
		||||
    dixChangeGC(NullClient, __gc, __mask, NULL, __v); \
 | 
			
		||||
}
 | 
			
		||||
} while (0)
 | 
			
		||||
 | 
			
		||||
#define XMesaSetDashes(__d,__gc,__do,__dl,__n) \
 | 
			
		||||
{ \
 | 
			
		||||
do { \
 | 
			
		||||
    (void) __d; \
 | 
			
		||||
    SetDashes(__gc, __do, __n, (unsigned char *)__dl); \
 | 
			
		||||
}
 | 
			
		||||
} while (0)
 | 
			
		||||
 | 
			
		||||
#define XMesaSetLineAttributes(__d,__gc,__lw,__ls,__cs,__js) \
 | 
			
		||||
{ \
 | 
			
		||||
do { \
 | 
			
		||||
    CARD32 __v[4]; \
 | 
			
		||||
    (void) __d; \
 | 
			
		||||
    __v[0] = __lw; \
 | 
			
		||||
@@ -84,7 +84,7 @@ typedef xColorItem  XMesaColor;
 | 
			
		||||
    dixChangeGC(NullClient, __gc, \
 | 
			
		||||
		GCLineWidth|GCLineStyle|GCCapStyle|GCJoinStyle, \
 | 
			
		||||
		__v, NULL); \
 | 
			
		||||
}
 | 
			
		||||
} while (0)
 | 
			
		||||
 | 
			
		||||
#define XMesaSetForeground(d,gc,v) XMesaSetGeneric(d,gc,v,GCForeground)
 | 
			
		||||
#define XMesaSetBackground(d,gc,v) XMesaSetGeneric(d,gc,v,GCBackground)
 | 
			
		||||
@@ -96,24 +96,24 @@ typedef xColorItem  XMesaColor;
 | 
			
		||||
#define XMesaSetStipple(d,gc,v)    XMesaSetGenericPtr(d,gc,v,GCStipple)
 | 
			
		||||
 | 
			
		||||
#define XMesaDrawPoint(__d,__b,__gc,__x,__y) \
 | 
			
		||||
{ \
 | 
			
		||||
do { \
 | 
			
		||||
    XMesaPoint __p[1]; \
 | 
			
		||||
    (void) __d; \
 | 
			
		||||
    __p[0].x = __x; \
 | 
			
		||||
    __p[0].y = __y; \
 | 
			
		||||
    ValidateGC(__b, __gc); \
 | 
			
		||||
    (*gc->ops->PolyPoint)(__b, __gc, CoordModeOrigin, 1, __p); \
 | 
			
		||||
}
 | 
			
		||||
} while (0)
 | 
			
		||||
 | 
			
		||||
#define XMesaDrawPoints(__d,__b,__gc,__p,__n,__m) \
 | 
			
		||||
{ \
 | 
			
		||||
do { \
 | 
			
		||||
    (void) __d; \
 | 
			
		||||
    ValidateGC(__b, __gc); \
 | 
			
		||||
    (*gc->ops->PolyPoint)(__b, __gc, __m, __n, __p); \
 | 
			
		||||
}
 | 
			
		||||
} while (0)
 | 
			
		||||
 | 
			
		||||
#define XMesaDrawLine(__d,__b,__gc,__x0,__y0,__x1,__y1) \
 | 
			
		||||
{ \
 | 
			
		||||
do { \
 | 
			
		||||
    XMesaPoint __p[2]; \
 | 
			
		||||
    (void) __d; \
 | 
			
		||||
    ValidateGC(__b, __gc); \
 | 
			
		||||
@@ -122,22 +122,22 @@ typedef xColorItem  XMesaColor;
 | 
			
		||||
    __p[1].x = __x1; \
 | 
			
		||||
    __p[1].y = __y1; \
 | 
			
		||||
    (*__gc->ops->Polylines)(__b, __gc, CoordModeOrigin, 2, __p); \
 | 
			
		||||
}
 | 
			
		||||
} while (0)
 | 
			
		||||
 | 
			
		||||
#define XMesaFillRectangle(__d,__b,__gc,__x,__y,__w,__h) \
 | 
			
		||||
{ \
 | 
			
		||||
do { \
 | 
			
		||||
    xRectangle __r[1]; \
 | 
			
		||||
    (void) __d; \
 | 
			
		||||
    ValidateGC(__b, __gc); \
 | 
			
		||||
    ValidateGC((DrawablePtr)__b, __gc); \
 | 
			
		||||
    __r[0].x = __x; \
 | 
			
		||||
    __r[0].y = __y; \
 | 
			
		||||
    __r[0].width = __w; \
 | 
			
		||||
    __r[0].height = __h; \
 | 
			
		||||
    (*__gc->ops->PolyFillRect)(__b, __gc, 1, __r); \
 | 
			
		||||
}
 | 
			
		||||
    (*__gc->ops->PolyFillRect)((DrawablePtr)__b, __gc, 1, __r); \
 | 
			
		||||
} while (0)
 | 
			
		||||
 | 
			
		||||
#define XMesaPutImage(__d,__b,__gc,__i,__sx,__sy,__x,__y,__w,__h) \
 | 
			
		||||
{ \
 | 
			
		||||
do { \
 | 
			
		||||
    /* Assumes: Images are always in ZPixmap format */ \
 | 
			
		||||
    (void) __d; \
 | 
			
		||||
    if (__sx || __sy) /* The non-trivial case */ \
 | 
			
		||||
@@ -146,22 +146,22 @@ typedef xColorItem  XMesaColor;
 | 
			
		||||
    (*__gc->ops->PutImage)(__b, __gc, ((XMesaDrawable)(__b))->depth, \
 | 
			
		||||
			   __x, __y, __w, __h, 0, ZPixmap, \
 | 
			
		||||
			   ((XMesaImage *)(__i))->data); \
 | 
			
		||||
}
 | 
			
		||||
} while (0)
 | 
			
		||||
 | 
			
		||||
#define XMesaCopyArea(__d,__sb,__db,__gc,__sx,__sy,__w,__h,__x,__y) \
 | 
			
		||||
{ \
 | 
			
		||||
do { \
 | 
			
		||||
    (void) __d; \
 | 
			
		||||
    ValidateGC(__db, __gc); \
 | 
			
		||||
    (*__gc->ops->CopyArea)((DrawablePtr)__sb, __db, __gc, \
 | 
			
		||||
			   __sx, __sy, __w, __h, __x, __y); \
 | 
			
		||||
}
 | 
			
		||||
} while (0)
 | 
			
		||||
 | 
			
		||||
#define XMesaFillPolygon(__d,__b,__gc,__p,__n,__s,__m) \
 | 
			
		||||
{ \
 | 
			
		||||
do { \
 | 
			
		||||
    (void) __d; \
 | 
			
		||||
    ValidateGC(__b, __gc); \
 | 
			
		||||
    (*__gc->ops->FillPolygon)(__b, __gc, __s, __m, __n, __p); \
 | 
			
		||||
}
 | 
			
		||||
} while (0)
 | 
			
		||||
 | 
			
		||||
/* CreatePixmap returns a PixmapPtr; so, it cannot be inside braces */
 | 
			
		||||
#define XMesaCreatePixmap(__d,__b,__w,__h,__depth) \
 | 
			
		||||
@@ -170,16 +170,15 @@ typedef xColorItem  XMesaColor;
 | 
			
		||||
    (*__d->DestroyPixmap)(__b)
 | 
			
		||||
 | 
			
		||||
#define XMesaFreeGC(__d,__gc) \
 | 
			
		||||
{ \
 | 
			
		||||
do { \
 | 
			
		||||
    (void) __d; \
 | 
			
		||||
    FreeScratchGC(__gc); \
 | 
			
		||||
}
 | 
			
		||||
} while (0)
 | 
			
		||||
 | 
			
		||||
#define GET_COLORMAP_SIZE(__v)  __v->visinfo->ColormapEntries
 | 
			
		||||
#define GET_REDMASK(__v)        __v->visinfo->redMask
 | 
			
		||||
#define GET_GREENMASK(__v)      __v->visinfo->greenMask
 | 
			
		||||
#define GET_BLUEMASK(__v)       __v->visinfo->blueMask
 | 
			
		||||
#define GET_BITS_PER_PIXEL(__v) __v->visinfo->bitsPerRGBValue
 | 
			
		||||
#define GET_VISUAL_CLASS(__v)   __v->visinfo->class
 | 
			
		||||
#define GET_VISUAL_DEPTH(__v)   __v->visinfo->nplanes
 | 
			
		||||
#define GET_BLACK_PIXEL(__v)    __v->display->blackPixel
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
# $Id: Makefile.BeOS-R4,v 1.3 1999/10/22 20:36:38 brianp Exp $
 | 
			
		||||
# $Id: Makefile.BeOS-R4,v 1.14 2001/02/20 17:04:52 brianp Exp $
 | 
			
		||||
 | 
			
		||||
# Mesa 3-D graphics library
 | 
			
		||||
# Version:  3.1
 | 
			
		||||
# Copyright (C) 1995-1999  Brian Paul
 | 
			
		||||
# Version:  3.5
 | 
			
		||||
# Copyright (C) 1995-2001  Brian Paul
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Makefile for GLUT-based demo programs for BeOS R4
 | 
			
		||||
@@ -17,9 +17,46 @@ GL_LIBS = -L$(LIBDIR) -L/boot/home/config/lib -Xlinker -rpath $(LIBDIR) -lbe -lg
 | 
			
		||||
 | 
			
		||||
LIB_DEP = $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(GLU_LIB) $(LIBDIR)/$(GLUT_LIB)
 | 
			
		||||
 | 
			
		||||
PROGS = bounce clearspd drawpix gamma gears glinfo gloss isosurf \
 | 
			
		||||
	morph3d multiarb osdemo paltex pointblast reflect \
 | 
			
		||||
	renormal spectex stex3d texcyl texobj trispd winpos
 | 
			
		||||
PROGS = bounce \
 | 
			
		||||
	clearspd \
 | 
			
		||||
	cubemap \
 | 
			
		||||
	drawpix \
 | 
			
		||||
	fire \
 | 
			
		||||
	gamma \
 | 
			
		||||
	gears \
 | 
			
		||||
	geartrain \
 | 
			
		||||
	glinfo \
 | 
			
		||||
	gloss \
 | 
			
		||||
	gltestperf \
 | 
			
		||||
	glutfx \
 | 
			
		||||
	isosurf \
 | 
			
		||||
	ipers \
 | 
			
		||||
	lodbias \
 | 
			
		||||
	morph3d \
 | 
			
		||||
	multiarb \
 | 
			
		||||
	occlude \
 | 
			
		||||
	osdemo \
 | 
			
		||||
	paltex \
 | 
			
		||||
	pixeltex \
 | 
			
		||||
	pointblast \
 | 
			
		||||
	ray \
 | 
			
		||||
	readpix \
 | 
			
		||||
	reflect \
 | 
			
		||||
	renormal \
 | 
			
		||||
	shadowtex \
 | 
			
		||||
	spectex \
 | 
			
		||||
	stex3d \
 | 
			
		||||
	teapot \
 | 
			
		||||
	terrain \
 | 
			
		||||
	tessdemo \
 | 
			
		||||
	texcyl \
 | 
			
		||||
	texdown \
 | 
			
		||||
	texenv \
 | 
			
		||||
	texobj \
 | 
			
		||||
	trispd \
 | 
			
		||||
	tunnel \
 | 
			
		||||
	tunnel2 \
 | 
			
		||||
	winpos
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
##### RULES #####
 | 
			
		||||
@@ -28,7 +65,7 @@ PROGS = bounce clearspd drawpix gamma gears glinfo gloss isosurf \
 | 
			
		||||
.SUFFIXES: .c
 | 
			
		||||
 | 
			
		||||
.c: $(LIB_DEP)
 | 
			
		||||
	$(CC) -I$(INCDIR) $(CFLAGS) $< $(GL_LIBS) -o $@
 | 
			
		||||
	$(CC) -I$(INCDIR) -I../util $(CFLAGS) $< $(GL_LIBS) -o $@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +1,8 @@
 | 
			
		||||
# $Id: Makefile.X11,v 1.3 1999/10/27 10:09:53 brianp Exp $
 | 
			
		||||
# $Id: Makefile.X11,v 1.20 2001/08/21 05:42:11 gareth Exp $
 | 
			
		||||
 | 
			
		||||
# Mesa 3-D graphics library
 | 
			
		||||
# Version:  3.1
 | 
			
		||||
# Copyright (C) 1995-1998  Brian Paul
 | 
			
		||||
 | 
			
		||||
# Version:  3.5
 | 
			
		||||
# Copyright (C) 1995-2001  Brian Paul
 | 
			
		||||
 | 
			
		||||
# Makefile for GLUT-based demo programs for Unix/X11
 | 
			
		||||
 | 
			
		||||
@@ -13,13 +12,52 @@
 | 
			
		||||
INCDIR = ../include
 | 
			
		||||
LIBDIR = ../lib
 | 
			
		||||
 | 
			
		||||
GL_LIBS = -L$(LIBDIR) -lglut -lGLU -lGL $(XLIBS)
 | 
			
		||||
GL_LIBS = -L$(LIBDIR) -lglut -lGLU -lGL $(APP_LIB_DEPS)
 | 
			
		||||
 | 
			
		||||
OSMESA_LIBS = -L$(LIBDIR) -lglut -lOSMesa -lGLU -lGL $(APP_LIB_DEPS)
 | 
			
		||||
 | 
			
		||||
LIB_DEP = $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(GLU_LIB) $(LIBDIR)/$(GLUT_LIB)
 | 
			
		||||
 | 
			
		||||
PROGS = bounce clearspd drawpix gamma gears glinfo gloss glutfx isosurf \
 | 
			
		||||
	morph3d multiarb osdemo paltex pointblast reflect \
 | 
			
		||||
	renormal spectex stex3d tessdemo texcyl texobj trispd winpos \
 | 
			
		||||
PROGS = bounce \
 | 
			
		||||
	clearspd \
 | 
			
		||||
	cubemap \
 | 
			
		||||
	drawpix \
 | 
			
		||||
	fire \
 | 
			
		||||
	gamma \
 | 
			
		||||
	gears \
 | 
			
		||||
	geartrain \
 | 
			
		||||
	glinfo \
 | 
			
		||||
	gloss \
 | 
			
		||||
	gltestperf \
 | 
			
		||||
	glutfx \
 | 
			
		||||
	isosurf \
 | 
			
		||||
	ipers \
 | 
			
		||||
	lodbias \
 | 
			
		||||
	morph3d \
 | 
			
		||||
	multiarb \
 | 
			
		||||
	occlude \
 | 
			
		||||
	osdemo \
 | 
			
		||||
	paltex \
 | 
			
		||||
	pixeltex \
 | 
			
		||||
	pointblast \
 | 
			
		||||
	ray \
 | 
			
		||||
	readpix \
 | 
			
		||||
	reflect \
 | 
			
		||||
	renormal \
 | 
			
		||||
	shadowtex \
 | 
			
		||||
	spectex \
 | 
			
		||||
	stex3d \
 | 
			
		||||
	teapot \
 | 
			
		||||
	terrain \
 | 
			
		||||
	tessdemo \
 | 
			
		||||
	texcyl \
 | 
			
		||||
	texdown \
 | 
			
		||||
	texenv \
 | 
			
		||||
	texobj \
 | 
			
		||||
	trispd \
 | 
			
		||||
	tunnel \
 | 
			
		||||
	tunnel2 \
 | 
			
		||||
	winpos
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
##### RULES #####
 | 
			
		||||
@@ -27,9 +65,14 @@ PROGS = bounce clearspd drawpix gamma gears glinfo gloss glutfx isosurf \
 | 
			
		||||
.SUFFIXES:
 | 
			
		||||
.SUFFIXES: .c
 | 
			
		||||
 | 
			
		||||
.c: $(LIB_DEP)
 | 
			
		||||
	$(CC) -I$(INCDIR) $(CFLAGS) $< $(GL_LIBS) -o $@
 | 
			
		||||
 | 
			
		||||
# make executable from .c file:
 | 
			
		||||
.c: $(LIB_DEP)
 | 
			
		||||
	$(CC) -I$(INCDIR) -I../util $(CFLAGS) $< $(GL_LIBS) -o $@
 | 
			
		||||
 | 
			
		||||
# special case: need the -lOSMesa library:
 | 
			
		||||
osdemo: osdemo.c
 | 
			
		||||
	$(CC) -I$(INCDIR) $(CFLAGS) osdemo.c $(OSMESA_LIBS) -o $@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
##### TARGETS #####
 | 
			
		||||
@@ -43,8 +86,17 @@ clean:
 | 
			
		||||
realclean:
 | 
			
		||||
	-rm $(PROGS)
 | 
			
		||||
	-rm *.o *~
 | 
			
		||||
	-rm readtex.[ch]
 | 
			
		||||
 | 
			
		||||
targets: readtex.c readtex.h $(PROGS)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
readtex.c:
 | 
			
		||||
	cp ../util/readtex.c .
 | 
			
		||||
 | 
			
		||||
readtex.h:
 | 
			
		||||
	cp ../util/readtex.c .
 | 
			
		||||
 | 
			
		||||
targets: $(PROGS)
 | 
			
		||||
 | 
			
		||||
# execute all programs
 | 
			
		||||
exec: $(PROGS)
 | 
			
		||||
@@ -57,4 +109,3 @@ exec: $(PROGS)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
include ../Make-config
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
# $Id: Makefile.cygnus,v 1.2 1999/10/22 20:37:23 brianp Exp $
 | 
			
		||||
# $Id: Makefile.cygnus,v 1.12 2000/12/24 22:53:54 pesco Exp $
 | 
			
		||||
 | 
			
		||||
# Mesa 3-D graphics library
 | 
			
		||||
# Version:  3.1
 | 
			
		||||
# Copyright (C) 1995-1999  Brian Paul
 | 
			
		||||
# Version:  3.3
 | 
			
		||||
# Copyright (C) 1995-2000  Brian Paul
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Makefile for demo programs for cygnus
 | 
			
		||||
@@ -19,9 +19,45 @@ GL_LIBS = -L$(LIBDIR) -lglut -lMesaGLU -lMesaGL -lm $(WLIBS)
 | 
			
		||||
 | 
			
		||||
LIB_DEP = $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(GLU_LIB) $(LIBDIR)/$(GLUT_LIB)
 | 
			
		||||
 | 
			
		||||
PROGS = clearspd drawpix gamma gears glinfo glutfx gloss isosurf \
 | 
			
		||||
	morph3d multiext osdemo paltex pointblast reflect \
 | 
			
		||||
	renormal spectex stex3d tessdemo texcyl texobj trispd winpos
 | 
			
		||||
PROGS = bounce \
 | 
			
		||||
	clearspd \
 | 
			
		||||
	cubemap \
 | 
			
		||||
	drawpix \
 | 
			
		||||
	fire \
 | 
			
		||||
	gamma \
 | 
			
		||||
	gears \
 | 
			
		||||
	geartrain \
 | 
			
		||||
	glinfo \
 | 
			
		||||
	gloss \
 | 
			
		||||
	gltestperf \
 | 
			
		||||
	glutfx \
 | 
			
		||||
	isosurf \
 | 
			
		||||
	ipers \
 | 
			
		||||
	lodbias \
 | 
			
		||||
	morph3d \
 | 
			
		||||
	multiarb \
 | 
			
		||||
	occlude \
 | 
			
		||||
	osdemo \
 | 
			
		||||
	paltex \
 | 
			
		||||
	pixeltex \
 | 
			
		||||
	pointblast \
 | 
			
		||||
	ray \
 | 
			
		||||
	readpix \
 | 
			
		||||
	reflect \
 | 
			
		||||
	renormal \
 | 
			
		||||
	spectex \
 | 
			
		||||
	stex3d \
 | 
			
		||||
	teapot \
 | 
			
		||||
	terrain \
 | 
			
		||||
	tessdemo \
 | 
			
		||||
	texcyl \
 | 
			
		||||
	texdown \
 | 
			
		||||
	texenv \
 | 
			
		||||
	texobj \
 | 
			
		||||
	trispd \
 | 
			
		||||
	tunnel \
 | 
			
		||||
	tunnel2 \
 | 
			
		||||
	winpos
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
##### RULES #####
 | 
			
		||||
@@ -30,7 +66,7 @@ PROGS = clearspd drawpix gamma gears glinfo glutfx gloss isosurf \
 | 
			
		||||
.SUFFIXES: .c
 | 
			
		||||
 | 
			
		||||
.c: $(LIB_DEP)
 | 
			
		||||
	$(CC) -I$(INCDIR) $(CFLAGS) $< $(GL_LIBS) -o $@
 | 
			
		||||
	$(CC) -I$(INCDIR) -I../util $(CFLAGS) $< $(GL_LIBS) -o $@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
##### TARGETS #####
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										130
									
								
								progs/demos/Makefile.win
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										130
									
								
								progs/demos/Makefile.win
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,130 @@
 | 
			
		||||
# $Id: Makefile.win,v 1.5.2.2 2002/04/15 22:14:09 kschultz Exp $
 | 
			
		||||
 | 
			
		||||
# Mesa 3-D graphics library
 | 
			
		||||
# Version:  3.5
 | 
			
		||||
# Copyright (C) 1995-2001  Brian Paul
 | 
			
		||||
 | 
			
		||||
# Makefile for GLUT-based demo programs for Windows
 | 
			
		||||
 | 
			
		||||
!include <win32.mak>
 | 
			
		||||
 | 
			
		||||
##### MACROS #####
 | 
			
		||||
 | 
			
		||||
TOP    = ..
 | 
			
		||||
INCDIR = ..\include
 | 
			
		||||
LIBDIR = ..\lib
 | 
			
		||||
 | 
			
		||||
PROGS = anisotropic \
 | 
			
		||||
	bounce \
 | 
			
		||||
	clearspd \
 | 
			
		||||
	cubemap \
 | 
			
		||||
	drawpix \
 | 
			
		||||
	fire \
 | 
			
		||||
	gamma \
 | 
			
		||||
	gears \
 | 
			
		||||
	geartrain \
 | 
			
		||||
	glinfo \
 | 
			
		||||
	gloss \
 | 
			
		||||
	gltestperf \
 | 
			
		||||
	glutfx \
 | 
			
		||||
	isosurf \
 | 
			
		||||
	ipers \
 | 
			
		||||
	lodbias \
 | 
			
		||||
	morph3d \
 | 
			
		||||
	multiarb \
 | 
			
		||||
	occlude \
 | 
			
		||||
	osdemo \
 | 
			
		||||
	paltex \
 | 
			
		||||
	pixeltex \
 | 
			
		||||
	pointblast \
 | 
			
		||||
	ray \
 | 
			
		||||
	readpix \
 | 
			
		||||
	reflect \
 | 
			
		||||
	renormal \
 | 
			
		||||
	shadowtex \
 | 
			
		||||
	spectex \
 | 
			
		||||
	stex3d \
 | 
			
		||||
	teapot \
 | 
			
		||||
	terrain \
 | 
			
		||||
	tessdemo \
 | 
			
		||||
	texcyl \
 | 
			
		||||
	texdown \
 | 
			
		||||
	texenv \
 | 
			
		||||
	texobj \
 | 
			
		||||
	trispd \
 | 
			
		||||
	tunnel \
 | 
			
		||||
	tunnel2 \
 | 
			
		||||
	winpos
 | 
			
		||||
 | 
			
		||||
SRCS = \
 | 
			
		||||
	bounce.c \
 | 
			
		||||
	clearspd.c \
 | 
			
		||||
	cubemap.c \
 | 
			
		||||
	drawpix.c \
 | 
			
		||||
	fire.c \
 | 
			
		||||
	gamma.c \
 | 
			
		||||
	gears.c \
 | 
			
		||||
	geartrain.c \
 | 
			
		||||
	glinfo.c \
 | 
			
		||||
	gloss.c \
 | 
			
		||||
	gltestperf.c \
 | 
			
		||||
	glutfx.c \
 | 
			
		||||
	isosurf.c \
 | 
			
		||||
	lodbias.c \
 | 
			
		||||
	morph3d.c \
 | 
			
		||||
	multiarb.c \
 | 
			
		||||
	occlude.c \
 | 
			
		||||
	paltex.c \
 | 
			
		||||
	pixeltex.c \
 | 
			
		||||
	pointblast.c \
 | 
			
		||||
	ray.c \
 | 
			
		||||
	readpix.c \
 | 
			
		||||
	reflect.c \
 | 
			
		||||
	renormal.c \
 | 
			
		||||
	shadowtex.c \
 | 
			
		||||
	spectex.c \
 | 
			
		||||
	stex3d.c \
 | 
			
		||||
	teapot.c \
 | 
			
		||||
	terrain.c \
 | 
			
		||||
	tessdemo.c \
 | 
			
		||||
	texcyl.c \
 | 
			
		||||
	texdown.c \
 | 
			
		||||
	texenv.c \
 | 
			
		||||
	texobj.c \
 | 
			
		||||
	trispd.c \
 | 
			
		||||
	tunnel.c \
 | 
			
		||||
	tunnel2.c \
 | 
			
		||||
	winpos.c
 | 
			
		||||
 | 
			
		||||
CXXSRCS = \
 | 
			
		||||
	rain.cxx
 | 
			
		||||
 | 
			
		||||
OSMESASRCS = osdemo.c
 | 
			
		||||
IPERSSRCS = ipers.c
 | 
			
		||||
IPERSEXES = $(IPERSSRCS:.c=.exe)
 | 
			
		||||
!include "../mesawin32.mak"
 | 
			
		||||
 | 
			
		||||
##### TARGETS #####
 | 
			
		||||
 | 
			
		||||
clean::
 | 
			
		||||
 | 
			
		||||
clobber::
 | 
			
		||||
	@del readtex.c readtex.h
 | 
			
		||||
 | 
			
		||||
$(EXES) : $*.obj readtex.c readtex.h
 | 
			
		||||
	@echo $@
 | 
			
		||||
	$(link) -out:$@ $* /LIBPATH:$(LIBDIR) $(LIBS)
 | 
			
		||||
 | 
			
		||||
$(OSMESAEXES) : $*.obj
 | 
			
		||||
	@echo $@
 | 
			
		||||
	$(link) $(lcommon) -out:$@ $* /LIBPATH:$(LIBDIR) $(LIBS) $(EXTRALIBS)
 | 
			
		||||
 | 
			
		||||
$(IPERSEXES) : $*.obj
 | 
			
		||||
	@echo $@
 | 
			
		||||
	$(link) -out:$@ $* /LIBPATH:$(LIBDIR) $(LIBS) winmm.lib
 | 
			
		||||
 | 
			
		||||
readtex.c:
 | 
			
		||||
	-copy ..\util\readtex.c .
 | 
			
		||||
 | 
			
		||||
readtex.h:
 | 
			
		||||
	-copy ..\util\readtex.h .
 | 
			
		||||
							
								
								
									
										230
									
								
								progs/demos/README
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										230
									
								
								progs/demos/README
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,230 @@
 | 
			
		||||
INTRODUCTION
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
This directory is usually included in the Mesa demos distribution or
 | 
			
		||||
in the GLUT distribution.
 | 
			
		||||
 | 
			
		||||
I have written the demos included in this directory mainly for showing
 | 
			
		||||
the capabilities of the Mesa library when using the Voodoo driver.
 | 
			
		||||
However all the demos are written using the GLUT and OpenGL so they
 | 
			
		||||
work with any GLUT/OpenGL platform (tested: Linux+Mesa+Voodoo driver,
 | 
			
		||||
Linux+Mesa+X11 driver, Win95+Mesa+Voodoo driver and SGI Onyx IR thanks
 | 
			
		||||
to Mark Kilgard).
 | 
			
		||||
 | 
			
		||||
All the demos make an heavy use of texture mapping, blending, etc. so
 | 
			
		||||
you _need_ some kind of hardware support for the OpenGL otherwise they
 | 
			
		||||
will run at ~1fps. You need also a OpenGL 1.1 compliant library.
 | 
			
		||||
 | 
			
		||||
You can find some screenshot of these demos at
 | 
			
		||||
http://www-hmw.caribel.pisa.it/fxmesa/fxdemos.hmtl
 | 
			
		||||
 | 
			
		||||
Write me if you find some bug in the demos.
 | 
			
		||||
 | 
			
		||||
David Bucciarelli (tech.hmw@plus.it)
 | 
			
		||||
 | 
			
		||||
Humanware s.r.l.
 | 
			
		||||
Via XXIV Maggio 62
 | 
			
		||||
Pisa, Italy
 | 
			
		||||
Tel./Fax +39-50-554108
 | 
			
		||||
email: info.hmw@plus.it
 | 
			
		||||
www: www-hmw.caribel.pisa.it
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
A BRIEF DESCRIPTION OF THE DEMOS
 | 
			
		||||
--------------------------------
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
IPERS
 | 
			
		||||
-----
 | 
			
		||||
 | 
			
		||||
Sources: ipers.c image.c
 | 
			
		||||
 | 
			
		||||
A nice spinning fractal object.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
RAY
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
Sources: ray.c
 | 
			
		||||
 | 
			
		||||
I'm using ray tracing to dynamically generate texture maps with
 | 
			
		||||
specular, diffuse, shadows, and mirror colors. Each frame the texture
 | 
			
		||||
maps of the plane and of the sphere are partially updated.  With this
 | 
			
		||||
technique you can obtain true mirrors, shadows, specular highlights,
 | 
			
		||||
bump mapping, etc. in realtime.  This demo is really CPU intensive
 | 
			
		||||
(~25fps on a PentiumII@300MHz with a Pure3D).  Support on-the-fly
 | 
			
		||||
switching between fullscreen and in-window rendering under Linux/Mesa
 | 
			
		||||
(start your X server in 16 bpp mode and press the spacebar).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
TUNNEL
 | 
			
		||||
------
 | 
			
		||||
 | 
			
		||||
Sources: tunnel.c image.c sources.c
 | 
			
		||||
Data: bw.rgb tile.rgb
 | 
			
		||||
 | 
			
		||||
The model was designed and prelighted with Alias|Wavefront
 | 
			
		||||
PowerAnimator V8. Triangle strips were built with a tool written by me
 | 
			
		||||
and then statically included in the sources.  This demo doesn't
 | 
			
		||||
require the ZBuffer and use antialiased polygons.  Support on-the-fly
 | 
			
		||||
switching between fullscreen and in-window rendering under Linux/Mesa
 | 
			
		||||
(start your X server in 16 bpp mode and press the spacebar).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
TUNNEL2
 | 
			
		||||
------
 | 
			
		||||
 | 
			
		||||
Sources: tunnel2.c image.c sources.c
 | 
			
		||||
Data: bw.rgb tile.rgb
 | 
			
		||||
 | 
			
		||||
The some tunnel demo but with two output channels. A nice
 | 
			
		||||
example of the Mesa/Voodoo support for multiple boards in
 | 
			
		||||
the some PC.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
TEAPOT
 | 
			
		||||
------
 | 
			
		||||
 | 
			
		||||
Sources: teapot.c image.c dteapot.c shadow.c
 | 
			
		||||
Data: bw.rgb tile.rgb
 | 
			
		||||
 | 
			
		||||
The shadow is drawn projecting the teapot geometry over the plane. All
 | 
			
		||||
other light effects are drawn using the standard OpenGL capabilities.
 | 
			
		||||
Support on-the-fly switching between fullscreen and in-window
 | 
			
		||||
rendering under Linux/Mesa (start your X server in 16 bpp mode and
 | 
			
		||||
press the spacebar).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
FIRE
 | 
			
		||||
----
 | 
			
		||||
 | 
			
		||||
Sources: fire.c image.c
 | 
			
		||||
Data: s128.rgb tree2.rgb
 | 
			
		||||
 | 
			
		||||
The demo use a small particle system to draw some nice visual effect.
 | 
			
		||||
You can interactively change many parameters of the particle system
 | 
			
		||||
and you can choose the number of particles at the startup ('fire
 | 
			
		||||
4000').  This demo should be called fountain.  Support on-the-fly
 | 
			
		||||
switching between fullscreen and in-window rendering under Linux/Mesa
 | 
			
		||||
(start your X server in 16 bpp mode and press the spacebar).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
TERRAIN
 | 
			
		||||
-------
 | 
			
		||||
 | 
			
		||||
Sources: mesaland.c
 | 
			
		||||
 | 
			
		||||
This demo is base on another demo written by Mikael SkiZoWalker.  I
 | 
			
		||||
have added the capabilities to freely fly around, view culling and
 | 
			
		||||
some nice color.  Support on-the-fly switching between fullscreen and
 | 
			
		||||
in-window rendering under Linux/Mesa (start your X server in 16 bpp
 | 
			
		||||
mode and press the spacebar).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
GLTEST
 | 
			
		||||
------
 | 
			
		||||
 | 
			
		||||
Sources: gltest.c
 | 
			
		||||
 | 
			
		||||
This is a simple benchmark suite that I'm using in the development of
 | 
			
		||||
the Mesa/Voodoo driver. Type 'gltest >my.res' and you will get some
 | 
			
		||||
data about the performances of your OpenGL. Follow the results with my
 | 
			
		||||
PC (Linux+Mesa-2.6+PentiumII@300MHz+Pure3D):
 | 
			
		||||
 | 
			
		||||
Simple Points
 | 
			
		||||
587900.080674 Pnts/sec
 | 
			
		||||
 | 
			
		||||
Smooth Lines
 | 
			
		||||
SIZE=480 => 39007.426183 Lins/sec
 | 
			
		||||
SIZE=250 => 74575.016485 Lins/sec
 | 
			
		||||
SIZE=100 => 179734.882409 Lins/sec
 | 
			
		||||
SIZE=050 => 183987.795297 Lins/sec
 | 
			
		||||
SIZE=025 => 183820.086309 Lins/sec
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
ZSmooth Triangles
 | 
			
		||||
SIZE=480 => 784.954997 Tris/sec
 | 
			
		||||
SIZE=250 => 2862.325889 Tris/sec
 | 
			
		||||
SIZE=100 => 17779.492938 Tris/sec
 | 
			
		||||
SIZE=050 => 159339.829844 Tris/sec
 | 
			
		||||
SIZE=025 => 428602.984008 Tris/sec
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
ZSmooth Tex Blend Triangles
 | 
			
		||||
SIZE=480 => 784.473931 Tris/sec
 | 
			
		||||
SIZE=250 => 2853.781513 Tris/sec
 | 
			
		||||
SIZE=100 => 17598.252146 Tris/sec
 | 
			
		||||
SIZE=050 => 152632.578337 Tris/sec
 | 
			
		||||
SIZE=025 => 377584.760048 Tris/sec
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
ZSmooth Tex Blend TMesh Triangles
 | 
			
		||||
SIZE=400 => 563.900695 Tris/sec, MPixel Fill/sec: 45.112056
 | 
			
		||||
SIZE=250 => 1449.777225 Tris/sec, MPixel Fill/sec: 45.305538
 | 
			
		||||
SIZE=100 => 8702.869121 Tris/sec, MPixel Fill/sec: 43.514346
 | 
			
		||||
SIZE=050 => 31896.867466 Tris/sec, MPixel Fill/sec: 39.871084
 | 
			
		||||
SIZE=025 => 114037.262894 Tris/sec, MPixel Fill/sec: 35.636645
 | 
			
		||||
SIZE=010 => 220494.235839 Tris/sec, MPixel Fill/sec: 11.024712
 | 
			
		||||
SIZE=005 => 225615.506651 Tris/sec, MPixel Fill/sec: 2.820194
 | 
			
		||||
SIZE=002 => 225607.681439 Tris/sec, MPixel Fill/sec: 0.451215
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Color/Depth Buffer Clears
 | 
			
		||||
295.042474 Clrs/sec, MPixel Fill/sec: 90.553256
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Follow the results with my
 | 
			
		||||
PC (Linux+Mesa-3.0beta5+PentiumII@300MHz+Voodoo2):
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Simple Points
 | 
			
		||||
1620113.525130 Pnts/sec
 | 
			
		||||
 | 
			
		||||
Smooth Lines
 | 
			
		||||
SIZE=480 => 73841.166065 Lins/sec
 | 
			
		||||
SIZE=250 => 140794.035316 Lins/sec
 | 
			
		||||
SIZE=100 => 344185.242157 Lins/sec
 | 
			
		||||
SIZE=050 => 420399.008289 Lins/sec
 | 
			
		||||
SIZE=025 => 420261.389773 Lins/sec
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
ZSmooth Triangles
 | 
			
		||||
SIZE=480 => 1434.668506 Tris/sec
 | 
			
		||||
SIZE=250 => 5228.449614 Tris/sec
 | 
			
		||||
SIZE=100 => 46603.815842 Tris/sec
 | 
			
		||||
SIZE=050 => 325757.045961 Tris/sec
 | 
			
		||||
SIZE=025 => 589022.403336 Tris/sec
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
ZSmooth Tex Blend Triangles
 | 
			
		||||
SIZE=480 => 1414.900041 Tris/sec
 | 
			
		||||
SIZE=250 => 5006.055235 Tris/sec
 | 
			
		||||
SIZE=100 => 43602.252031 Tris/sec
 | 
			
		||||
SIZE=050 => 303497.092692 Tris/sec
 | 
			
		||||
SIZE=025 => 517087.428669 Tris/sec
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
ZSmooth Tex Blend TMesh Triangles
 | 
			
		||||
SIZE=400 => 1023.273112 Tris/sec, MPixel Fill/sec: 81.861849
 | 
			
		||||
SIZE=250 => 2595.692121 Tris/sec, MPixel Fill/sec: 81.115379
 | 
			
		||||
SIZE=100 => 15788.198912 Tris/sec, MPixel Fill/sec: 78.940995
 | 
			
		||||
SIZE=050 => 58784.121300 Tris/sec, MPixel Fill/sec: 73.480152
 | 
			
		||||
SIZE=025 => 244233.873481 Tris/sec, MPixel Fill/sec: 76.323085
 | 
			
		||||
SIZE=010 => 474995.004191 Tris/sec, MPixel Fill/sec: 23.749750
 | 
			
		||||
SIZE=005 => 475124.354163 Tris/sec, MPixel Fill/sec: 5.939054
 | 
			
		||||
SIZE=002 => 474959.089503 Tris/sec, MPixel Fill/sec: 0.949918
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Color/Depth Buffer Clears
 | 
			
		||||
478.654830 Clrs/sec, MPixel Fill/sec: 146.906826
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
PALTEX and GLBPALTX
 | 
			
		||||
-------------------
 | 
			
		||||
 | 
			
		||||
Sources: paltex.c and glbpaltx.c
 | 
			
		||||
 | 
			
		||||
The PALTEX example was written by Brian Paul and it shows the
 | 
			
		||||
capabilities of the GL_EXT_paletted_texture extension.  I have written
 | 
			
		||||
the other example in order to show the capabilities of the
 | 
			
		||||
gl3DfxSetPaletteEXT() (it used only by GLQuake and Quake2).
 | 
			
		||||
@@ -1,33 +1,13 @@
 | 
			
		||||
/* $Id: bounce.c,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
 | 
			
		||||
/* $Id: bounce.c,v 1.3 2000/08/16 20:36:34 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Bouncing ball demo.  Color index mode only!
 | 
			
		||||
 * Bouncing ball demo.
 | 
			
		||||
 *
 | 
			
		||||
 * This program is in the public domain
 | 
			
		||||
 *
 | 
			
		||||
 * Brian Paul
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/* Conversion to GLUT by Mark J. Kilgard */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: bounce.c,v $
 | 
			
		||||
 * Revision 1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Initial revision
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.3  1999/03/18 08:16:14  joukj
 | 
			
		||||
 *
 | 
			
		||||
 *     cmpstr needs string.h to included to avoid warnings
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.2  1998/11/28 01:13:02  brianp
 | 
			
		||||
 * now sets an initial window position and size
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.1  1998/11/28 01:06:57  brianp
 | 
			
		||||
 * now works in RGB mode by default
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.0  1998/02/14 18:42:29  brianp
 | 
			
		||||
 * initial rev
 | 
			
		||||
 *
 | 
			
		||||
 * Conversion to GLUT by Mark J. Kilgard
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -81,9 +61,9 @@ make_ball(void)
 | 
			
		||||
        glColor3f(1, 1, 1);
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      x = COS(b) * COS(a);
 | 
			
		||||
      y = SIN(b) * COS(a);
 | 
			
		||||
      z = SIN(a);
 | 
			
		||||
      x = radius * COS(b) * COS(a);
 | 
			
		||||
      y = radius * SIN(b) * COS(a);
 | 
			
		||||
      z = radius * SIN(a);
 | 
			
		||||
      glVertex3f(x, y, z);
 | 
			
		||||
 | 
			
		||||
      x = radius * COS(b) * COS(a + da);
 | 
			
		||||
@@ -195,7 +175,7 @@ idle(void)
 | 
			
		||||
  glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void 
 | 
			
		||||
static void 
 | 
			
		||||
visible(int vis)
 | 
			
		||||
{
 | 
			
		||||
  if (vis == GLUT_VISIBLE)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: clearspd.c,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
 | 
			
		||||
/* $Id: clearspd.c,v 1.3 2000/12/07 21:50:39 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Simple GLUT program to measure glClear() and glutSwapBuffers() speed.
 | 
			
		||||
@@ -7,8 +7,14 @@
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: clearspd.c,v $
 | 
			
		||||
 * Revision 1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Initial revision
 | 
			
		||||
 * Revision 1.3  2000/12/07 21:50:39  brianp
 | 
			
		||||
 * call glFinish() before getting t1 time
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.2  2000/04/10 16:25:15  brianp
 | 
			
		||||
 * fixed visual selection and reporting results
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.1.1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Imported sources
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.3  1999/03/28 18:18:33  brianp
 | 
			
		||||
 * minor clean-up
 | 
			
		||||
@@ -68,6 +74,7 @@ static void Display( void )
 | 
			
		||||
         glClear( BufferMask );
 | 
			
		||||
         glutSwapBuffers();
 | 
			
		||||
      }
 | 
			
		||||
      glFinish();
 | 
			
		||||
      t1 = glutGet(GLUT_ELAPSED_TIME) * 0.001;
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
@@ -75,6 +82,7 @@ static void Display( void )
 | 
			
		||||
      for (i=0;i<Loops;i++) {
 | 
			
		||||
         glClear( BufferMask );
 | 
			
		||||
      }
 | 
			
		||||
      glFinish();
 | 
			
		||||
      t1 = glutGet(GLUT_ELAPSED_TIME) * 0.001;
 | 
			
		||||
      glutSwapBuffers();
 | 
			
		||||
   }
 | 
			
		||||
@@ -88,12 +96,12 @@ static void Display( void )
 | 
			
		||||
   clearRate = Loops / (t1-t0);
 | 
			
		||||
   pixelRate = clearRate * Width * Height;
 | 
			
		||||
   if (SwapFlag) {
 | 
			
		||||
      printf("Rate: %d clears+swaps in %gs = %g clears+swaps/s   %d pixels/s\n",
 | 
			
		||||
             Loops, t1-t0, clearRate, (int)pixelRate );
 | 
			
		||||
      printf("Rate: %d clears+swaps in %gs = %g clears+swaps/s   %g pixels/s\n",
 | 
			
		||||
             Loops, t1-t0, clearRate, pixelRate );
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      printf("Rate: %d clears in %gs = %g clears/s   %d pixels/s\n",
 | 
			
		||||
             Loops, t1-t0, clearRate, (int)pixelRate);
 | 
			
		||||
      printf("Rate: %d clears in %gs = %g clears/s   %g pixels/s\n",
 | 
			
		||||
             Loops, t1-t0, clearRate, pixelRate);
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -194,6 +202,8 @@ static void Help( const char *program )
 | 
			
		||||
 | 
			
		||||
int main( int argc, char *argv[] )
 | 
			
		||||
{
 | 
			
		||||
   GLint mode;
 | 
			
		||||
 | 
			
		||||
   printf("For options:  %s -help\n", argv[0]);
 | 
			
		||||
 | 
			
		||||
   Init( argc, argv );
 | 
			
		||||
@@ -202,7 +212,15 @@ int main( int argc, char *argv[] )
 | 
			
		||||
   glutInitWindowSize( (int) Width, (int) Height );
 | 
			
		||||
   glutInitWindowPosition( 0, 0 );
 | 
			
		||||
 | 
			
		||||
   glutInitDisplayMode( ColorMode | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL | GLUT_ACCUM );
 | 
			
		||||
   mode = ColorMode | GLUT_DOUBLE;
 | 
			
		||||
   if (BufferMask & GL_STENCIL_BUFFER_BIT)
 | 
			
		||||
      mode |= GLUT_STENCIL;
 | 
			
		||||
   if (BufferMask & GL_ACCUM_BUFFER_BIT)
 | 
			
		||||
      mode |= GLUT_ACCUM;
 | 
			
		||||
   if (BufferMask & GL_DEPTH_BUFFER_BIT)
 | 
			
		||||
      mode |= GLUT_DEPTH;
 | 
			
		||||
         
 | 
			
		||||
   glutInitDisplayMode(mode);
 | 
			
		||||
 | 
			
		||||
   glutCreateWindow( argv[0] );
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										250
									
								
								progs/demos/cubemap.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										250
									
								
								progs/demos/cubemap.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,250 @@
 | 
			
		||||
/* $Id: cubemap.c,v 1.3 2000/06/27 17:04:43 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * GL_ARB_texture_cube_map demo
 | 
			
		||||
 *
 | 
			
		||||
 * Brian Paul
 | 
			
		||||
 * May 2000
 | 
			
		||||
 *
 | 
			
		||||
 *
 | 
			
		||||
 * Copyright (C) 2000  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * 
 | 
			
		||||
 * Permission is hereby granted, free of charge, to any person obtaining a
 | 
			
		||||
 * copy of this software and associated documentation files (the "Software"),
 | 
			
		||||
 * to deal in the Software without restriction, including without limitation
 | 
			
		||||
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 | 
			
		||||
 * and/or sell copies of the Software, and to permit persons to whom the
 | 
			
		||||
 * Software is furnished to do so, subject to the following conditions:
 | 
			
		||||
 * 
 | 
			
		||||
 * The above copyright notice and this permission notice shall be included
 | 
			
		||||
 * in all copies or substantial portions of the Software.
 | 
			
		||||
 * 
 | 
			
		||||
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 | 
			
		||||
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
			
		||||
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 | 
			
		||||
 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
 | 
			
		||||
 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 | 
			
		||||
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * This is a pretty minimalistic demo for now.  Eventually, use some
 | 
			
		||||
 * interesting cube map textures and 3D objects.
 | 
			
		||||
 * For now, we use 6 checkerboard "walls" and a sphere (good for
 | 
			
		||||
 * verification purposes).
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include "GL/glut.h"
 | 
			
		||||
 | 
			
		||||
static GLfloat Xrot = 0, Yrot = 0;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void draw( void )
 | 
			
		||||
{
 | 
			
		||||
   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 | 
			
		||||
 | 
			
		||||
   glMatrixMode(GL_TEXTURE);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glRotatef(Xrot, 1, 0, 0);
 | 
			
		||||
   glRotatef(Yrot, 0, 1, 0);
 | 
			
		||||
   glutSolidSphere(2.0, 20, 20);
 | 
			
		||||
   glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
 | 
			
		||||
   glutSwapBuffers();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void idle(void)
 | 
			
		||||
{
 | 
			
		||||
   Yrot += 5.0;
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void set_mode(GLuint mode)
 | 
			
		||||
{
 | 
			
		||||
   if (mode == 0) {
 | 
			
		||||
      glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP_ARB);
 | 
			
		||||
      glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP_ARB);
 | 
			
		||||
      glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP_ARB);
 | 
			
		||||
      printf("GL_REFLECTION_MAP_ARB mode\n");
 | 
			
		||||
   }
 | 
			
		||||
   else if (mode == 1) {
 | 
			
		||||
      glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP_ARB);
 | 
			
		||||
      glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP_ARB);
 | 
			
		||||
      glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP_ARB);
 | 
			
		||||
      printf("GL_NORMAL_MAP_ARB mode\n");
 | 
			
		||||
   }
 | 
			
		||||
   glEnable(GL_TEXTURE_GEN_S);
 | 
			
		||||
   glEnable(GL_TEXTURE_GEN_T);
 | 
			
		||||
   glEnable(GL_TEXTURE_GEN_R);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void key(unsigned char k, int x, int y)
 | 
			
		||||
{
 | 
			
		||||
   static GLboolean anim = GL_TRUE;
 | 
			
		||||
   static GLuint mode = 0;
 | 
			
		||||
   (void) x;
 | 
			
		||||
   (void) y;
 | 
			
		||||
   switch (k) {
 | 
			
		||||
      case ' ':
 | 
			
		||||
         anim = !anim;
 | 
			
		||||
         if (anim)
 | 
			
		||||
            glutIdleFunc(idle);
 | 
			
		||||
         else
 | 
			
		||||
            glutIdleFunc(NULL);
 | 
			
		||||
         break;
 | 
			
		||||
      case 'm':
 | 
			
		||||
         mode = !mode;
 | 
			
		||||
         set_mode(mode);
 | 
			
		||||
         break;
 | 
			
		||||
      case 27:
 | 
			
		||||
         exit(0);
 | 
			
		||||
   }
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void specialkey(int key, int x, int y)
 | 
			
		||||
{
 | 
			
		||||
   GLfloat step = 10;
 | 
			
		||||
   (void) x;
 | 
			
		||||
   (void) y;
 | 
			
		||||
   switch (key) {
 | 
			
		||||
      case GLUT_KEY_UP:
 | 
			
		||||
         Xrot -= step;
 | 
			
		||||
         break;
 | 
			
		||||
      case GLUT_KEY_DOWN:
 | 
			
		||||
         Xrot += step;
 | 
			
		||||
         break;
 | 
			
		||||
      case GLUT_KEY_LEFT:
 | 
			
		||||
         Yrot -= step;
 | 
			
		||||
         break;
 | 
			
		||||
      case GLUT_KEY_RIGHT:
 | 
			
		||||
         Yrot += step;
 | 
			
		||||
         break;
 | 
			
		||||
   }
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* new window size or exposure */
 | 
			
		||||
static void reshape(int width, int height)
 | 
			
		||||
{
 | 
			
		||||
   glViewport(0, 0, (GLint)width, (GLint)height);
 | 
			
		||||
   glMatrixMode(GL_PROJECTION);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glFrustum( -2.0, 2.0, -2.0, 2.0, 6.0, 20.0 );
 | 
			
		||||
   glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glTranslatef( 0.0, 0.0, -8.0 );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void init( void )
 | 
			
		||||
{
 | 
			
		||||
#define CUBE_TEX_SIZE 64
 | 
			
		||||
   GLubyte image[CUBE_TEX_SIZE][CUBE_TEX_SIZE][3];
 | 
			
		||||
   static const GLubyte colors[6][3] = {
 | 
			
		||||
      { 255,   0,   0 },
 | 
			
		||||
      {   0, 255, 255 },
 | 
			
		||||
      {   0, 255,   0 },
 | 
			
		||||
      { 255,   0, 255 },
 | 
			
		||||
      {   0,   0, 255 },
 | 
			
		||||
      { 255, 255,   0 }
 | 
			
		||||
   };
 | 
			
		||||
   static const GLenum targets[6] = {
 | 
			
		||||
      GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB,
 | 
			
		||||
      GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB,
 | 
			
		||||
      GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB,
 | 
			
		||||
      GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB,
 | 
			
		||||
      GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB,
 | 
			
		||||
      GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB
 | 
			
		||||
   };
 | 
			
		||||
 | 
			
		||||
   GLint i, j, f;
 | 
			
		||||
 | 
			
		||||
   /* check for extension */
 | 
			
		||||
   {
 | 
			
		||||
      char *exten = (char *) glGetString(GL_EXTENSIONS);
 | 
			
		||||
      if (!strstr(exten, "GL_ARB_texture_cube_map")) {
 | 
			
		||||
         printf("Sorry, this demo requires GL_ARB_texture_cube_map\n");
 | 
			
		||||
         exit(0);
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
 | 
			
		||||
 | 
			
		||||
   /* make colored checkerboard cube faces */
 | 
			
		||||
   for (f = 0; f < 6; f++) {
 | 
			
		||||
      for (i = 0; i < CUBE_TEX_SIZE; i++) {
 | 
			
		||||
         for (j = 0; j < CUBE_TEX_SIZE; j++) {
 | 
			
		||||
            if ((i/4 + j/4) & 1) {
 | 
			
		||||
               image[i][j][0] = colors[f][0];
 | 
			
		||||
               image[i][j][1] = colors[f][1];
 | 
			
		||||
               image[i][j][2] = colors[f][2];
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
               image[i][j][0] = 255;
 | 
			
		||||
               image[i][j][1] = 255;
 | 
			
		||||
               image[i][j][2] = 255;
 | 
			
		||||
            }
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      glTexImage2D(targets[f], 0, GL_RGB, CUBE_TEX_SIZE, CUBE_TEX_SIZE, 0,
 | 
			
		||||
                   GL_RGB, GL_UNSIGNED_BYTE, image);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
#if 1
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
 | 
			
		||||
#else
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 | 
			
		||||
#endif
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
 | 
			
		||||
 | 
			
		||||
   glEnable(GL_TEXTURE_CUBE_MAP_ARB);
 | 
			
		||||
 | 
			
		||||
   glClearColor(.3, .3, .3, 0);
 | 
			
		||||
   glColor3f( 1.0, 1.0, 1.0 );
 | 
			
		||||
 | 
			
		||||
   set_mode(0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void usage(void)
 | 
			
		||||
{
 | 
			
		||||
   printf("keys:\n");
 | 
			
		||||
   printf("  SPACE - toggle animation\n");
 | 
			
		||||
   printf("  CURSOR KEYS - rotation\n");
 | 
			
		||||
   printf("  m - toggle texgen reflection mode\n");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int main( int argc, char *argv[] )
 | 
			
		||||
{
 | 
			
		||||
   glutInitWindowPosition(0, 0);
 | 
			
		||||
   glutInitWindowSize(300, 300);
 | 
			
		||||
   glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
 | 
			
		||||
   glutCreateWindow("Texture Cube Maping");
 | 
			
		||||
   init();
 | 
			
		||||
   glutReshapeFunc( reshape );
 | 
			
		||||
   glutKeyboardFunc( key );
 | 
			
		||||
   glutSpecialFunc( specialkey );
 | 
			
		||||
   glutIdleFunc( idle );
 | 
			
		||||
   glutDisplayFunc( draw );
 | 
			
		||||
   usage();
 | 
			
		||||
   glutMainLoop();
 | 
			
		||||
   return 0;
 | 
			
		||||
}
 | 
			
		||||
@@ -9,8 +9,8 @@
 | 
			
		||||
 | 
			
		||||
##### MACROS #####
 | 
			
		||||
 | 
			
		||||
INCDIR = [-.include]
 | 
			
		||||
CFLAGS = /include=$(INCDIR)/prefix=all
 | 
			
		||||
INCDIR = ([-.include],[-.util])
 | 
			
		||||
CFLAGS = /include=$(INCDIR)/prefix=all/name=(as_is,short)
 | 
			
		||||
 | 
			
		||||
.ifdef SHARE
 | 
			
		||||
GL_LIBS = $(XLIBS)
 | 
			
		||||
@@ -28,7 +28,7 @@ PROGS = bounce.exe;,clearspd.exe;,drawpix.exe;,gamma.exe;,gears.exe;,\
 | 
			
		||||
 | 
			
		||||
##### RULES #####
 | 
			
		||||
.obj.exe :
 | 
			
		||||
	link $(MMS$TARGET_NAME),$(GL_LIBS)
 | 
			
		||||
	cxxlink $(MMS$TARGET_NAME),$(GL_LIBS)
 | 
			
		||||
 | 
			
		||||
##### TARGETS #####
 | 
			
		||||
default :
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: drawpix.c,v 1.3 1999/10/28 18:23:29 brianp Exp $ */
 | 
			
		||||
/* $Id: drawpix.c,v 1.5.2.2 2002/09/13 18:15:09 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * glDrawPixels demo/test/benchmark
 | 
			
		||||
@@ -6,38 +6,13 @@
 | 
			
		||||
 * Brian Paul   September 25, 1997  This file is in the public domain.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: drawpix.c,v $
 | 
			
		||||
 * Revision 1.3  1999/10/28 18:23:29  brianp
 | 
			
		||||
 * minor changes to Usage() function
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.2  1999/10/21 22:13:58  brianp
 | 
			
		||||
 * added f key to toggle front/back drawing
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.1.1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Imported sources
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.3  1999/03/28 18:18:33  brianp
 | 
			
		||||
 * minor clean-up
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.2  1998/11/05 04:34:04  brianp
 | 
			
		||||
 * moved image files to ../images/ directory
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.1  1998/02/22 16:43:17  brianp
 | 
			
		||||
 * added a few casts to silence compiler warnings
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.0  1998/02/14 18:42:29  brianp
 | 
			
		||||
 * initial rev
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
 | 
			
		||||
#include "../util/readtex.c"  /* a hack, I know */
 | 
			
		||||
#include "readtex.c"
 | 
			
		||||
 | 
			
		||||
#define IMAGE_FILE "../images/girl.rgb"
 | 
			
		||||
 | 
			
		||||
@@ -51,7 +26,7 @@ static int DrawWidth, DrawHeight;
 | 
			
		||||
static int Scissor = 0;
 | 
			
		||||
static float Xzoom, Yzoom;
 | 
			
		||||
static GLboolean DrawFront = GL_FALSE;
 | 
			
		||||
 | 
			
		||||
static GLboolean Dither = GL_TRUE;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void Reset( void )
 | 
			
		||||
@@ -154,6 +129,13 @@ static void Key( unsigned char key, int x, int y )
 | 
			
		||||
      case ' ':
 | 
			
		||||
         Reset();
 | 
			
		||||
         break;
 | 
			
		||||
      case 'd':
 | 
			
		||||
         Dither = !Dither;
 | 
			
		||||
         if (Dither)
 | 
			
		||||
            glEnable(GL_DITHER);
 | 
			
		||||
         else
 | 
			
		||||
            glDisable(GL_DITHER);
 | 
			
		||||
         break;
 | 
			
		||||
      case 'w':
 | 
			
		||||
         if (DrawWidth > 0)
 | 
			
		||||
            DrawWidth--;
 | 
			
		||||
@@ -251,7 +233,7 @@ static void Init( GLboolean ciMode )
 | 
			
		||||
 | 
			
		||||
   if (ciMode) {
 | 
			
		||||
      /* Convert RGB image to grayscale */
 | 
			
		||||
      GLubyte *indexImage = malloc( ImgWidth * ImgHeight );
 | 
			
		||||
      GLubyte *indexImage = (GLubyte *) malloc( ImgWidth * ImgHeight );
 | 
			
		||||
      GLint i;
 | 
			
		||||
      for (i=0; i<ImgWidth*ImgHeight; i++) {
 | 
			
		||||
         int gray = Image[i*3] + Image[i*3+1] + Image[i*3+2];
 | 
			
		||||
@@ -318,7 +300,7 @@ int main( int argc, char *argv[] )
 | 
			
		||||
   if (ciMode)
 | 
			
		||||
      glutInitDisplayMode( GLUT_INDEX | GLUT_DOUBLE );
 | 
			
		||||
   else
 | 
			
		||||
      glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
 | 
			
		||||
      glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE);
 | 
			
		||||
 | 
			
		||||
   glutCreateWindow(argv[0]);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										770
									
								
								progs/demos/fire.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										770
									
								
								progs/demos/fire.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,770 @@
 | 
			
		||||
/*
 | 
			
		||||
 * This program is under the GNU GPL.
 | 
			
		||||
 * Use at your own risk.
 | 
			
		||||
 *
 | 
			
		||||
 * written by David Bucciarelli (tech.hmw@plus.it)
 | 
			
		||||
 *            Humanware s.r.l.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <time.h>
 | 
			
		||||
 | 
			
		||||
#ifdef WIN32
 | 
			
		||||
#include <windows.h>
 | 
			
		||||
#include <mmsystem.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
#include "readtex.c"
 | 
			
		||||
 | 
			
		||||
#ifdef XMESA
 | 
			
		||||
#include "GL/xmesa.h"
 | 
			
		||||
static int fullscreen = 1;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef M_PI
 | 
			
		||||
#define M_PI 3.1415926535
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define vinit(a,i,j,k) {\
 | 
			
		||||
  (a)[0]=i;\
 | 
			
		||||
  (a)[1]=j;\
 | 
			
		||||
  (a)[2]=k;\
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#define vinit4(a,i,j,k,w) {\
 | 
			
		||||
  (a)[0]=i;\
 | 
			
		||||
  (a)[1]=j;\
 | 
			
		||||
  (a)[2]=k;\
 | 
			
		||||
  (a)[3]=w;\
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define vadds(a,dt,b) {\
 | 
			
		||||
  (a)[0]+=(dt)*(b)[0];\
 | 
			
		||||
  (a)[1]+=(dt)*(b)[1];\
 | 
			
		||||
  (a)[2]+=(dt)*(b)[2];\
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#define vequ(a,b) {\
 | 
			
		||||
  (a)[0]=(b)[0];\
 | 
			
		||||
  (a)[1]=(b)[1];\
 | 
			
		||||
  (a)[2]=(b)[2];\
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#define vinter(a,dt,b,c) {\
 | 
			
		||||
  (a)[0]=(dt)*(b)[0]+(1.0-dt)*(c)[0];\
 | 
			
		||||
  (a)[1]=(dt)*(b)[1]+(1.0-dt)*(c)[1];\
 | 
			
		||||
  (a)[2]=(dt)*(b)[2]+(1.0-dt)*(c)[2];\
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#define clamp(a)        ((a) < 0.0 ? 0.0 : ((a) < 1.0 ? (a) : 1.0))
 | 
			
		||||
 | 
			
		||||
#define vclamp(v) {\
 | 
			
		||||
  (v)[0]=clamp((v)[0]);\
 | 
			
		||||
  (v)[1]=clamp((v)[1]);\
 | 
			
		||||
  (v)[2]=clamp((v)[2]);\
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int WIDTH = 640;
 | 
			
		||||
static int HEIGHT = 480;
 | 
			
		||||
 | 
			
		||||
static GLint T0 = 0;
 | 
			
		||||
static GLint Frames = 0;
 | 
			
		||||
static GLint NiceFog = 1;
 | 
			
		||||
 | 
			
		||||
#define DIMP 20.0
 | 
			
		||||
#define DIMTP 16.0
 | 
			
		||||
 | 
			
		||||
#define RIDCOL 0.4
 | 
			
		||||
 | 
			
		||||
#define NUMTREE 50
 | 
			
		||||
#define TREEINR 2.5
 | 
			
		||||
#define TREEOUTR 8.0
 | 
			
		||||
 | 
			
		||||
#define AGRAV -9.8
 | 
			
		||||
 | 
			
		||||
typedef struct
 | 
			
		||||
{
 | 
			
		||||
   int age;
 | 
			
		||||
   float p[3][3];
 | 
			
		||||
   float v[3];
 | 
			
		||||
   float c[3][4];
 | 
			
		||||
}
 | 
			
		||||
part;
 | 
			
		||||
 | 
			
		||||
static float treepos[NUMTREE][3];
 | 
			
		||||
 | 
			
		||||
static float black[3] = { 0.0, 0.0, 0.0 };
 | 
			
		||||
static float blu[3] = { 0.0, 0.2, 1.0 };
 | 
			
		||||
static float blu2[3] = { 0.0, 1.0, 1.0 };
 | 
			
		||||
 | 
			
		||||
static float fogcolor[4] = { 1.0, 1.0, 1.0, 1.0 };
 | 
			
		||||
 | 
			
		||||
static float q[4][3] = {
 | 
			
		||||
   {-DIMP, 0.0, -DIMP},
 | 
			
		||||
   {DIMP, 0.0, -DIMP},
 | 
			
		||||
   {DIMP, 0.0, DIMP},
 | 
			
		||||
   {-DIMP, 0.0, DIMP}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
static float qt[4][2] = {
 | 
			
		||||
   {-DIMTP, -DIMTP},
 | 
			
		||||
   {DIMTP, -DIMTP},
 | 
			
		||||
   {DIMTP, DIMTP},
 | 
			
		||||
   {-DIMTP, DIMTP}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
static int win = 0;
 | 
			
		||||
 | 
			
		||||
static int np;
 | 
			
		||||
static float eject_r, dt, maxage, eject_vy, eject_vl;
 | 
			
		||||
static short shadows;
 | 
			
		||||
static float ridtri;
 | 
			
		||||
static int fog = 1;
 | 
			
		||||
static int help = 1;
 | 
			
		||||
static int joyavailable = 0;
 | 
			
		||||
static int joyactive = 0;
 | 
			
		||||
 | 
			
		||||
static part *p;
 | 
			
		||||
 | 
			
		||||
static GLuint groundid;
 | 
			
		||||
static GLuint treeid;
 | 
			
		||||
 | 
			
		||||
static float obs[3] = { 2.0, 1.0, 0.0 };
 | 
			
		||||
static float dir[3];
 | 
			
		||||
static float v = 0.0;
 | 
			
		||||
static float alpha = -90.0;
 | 
			
		||||
static float beta = 90.0;
 | 
			
		||||
 | 
			
		||||
static float
 | 
			
		||||
vrnd(void)
 | 
			
		||||
{
 | 
			
		||||
   return (((float) rand()) / RAND_MAX);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
setnewpart(part * p)
 | 
			
		||||
{
 | 
			
		||||
   float a, v[3], *c;
 | 
			
		||||
 | 
			
		||||
   p->age = 0;
 | 
			
		||||
 | 
			
		||||
   a = vrnd() * 3.14159265359 * 2.0;
 | 
			
		||||
 | 
			
		||||
   vinit(v, sin(a) * eject_r * vrnd(), 0.15, cos(a) * eject_r * vrnd());
 | 
			
		||||
   vinit(p->p[0], v[0] + vrnd() * ridtri, v[1] + vrnd() * ridtri,
 | 
			
		||||
	 v[2] + vrnd() * ridtri);
 | 
			
		||||
   vinit(p->p[1], v[0] + vrnd() * ridtri, v[1] + vrnd() * ridtri,
 | 
			
		||||
	 v[2] + vrnd() * ridtri);
 | 
			
		||||
   vinit(p->p[2], v[0] + vrnd() * ridtri, v[1] + vrnd() * ridtri,
 | 
			
		||||
	 v[2] + vrnd() * ridtri);
 | 
			
		||||
 | 
			
		||||
   vinit(p->v, v[0] * eject_vl / (eject_r / 2),
 | 
			
		||||
	 vrnd() * eject_vy + eject_vy / 2, v[2] * eject_vl / (eject_r / 2));
 | 
			
		||||
 | 
			
		||||
   c = blu;
 | 
			
		||||
 | 
			
		||||
   vinit4(p->c[0], c[0] * ((1.0 - RIDCOL) + vrnd() * RIDCOL),
 | 
			
		||||
	  c[1] * ((1.0 - RIDCOL) + vrnd() * RIDCOL),
 | 
			
		||||
	  c[2] * ((1.0 - RIDCOL) + vrnd() * RIDCOL), 1.0);
 | 
			
		||||
   vinit4(p->c[1], c[0] * ((1.0 - RIDCOL) + vrnd() * RIDCOL),
 | 
			
		||||
	  c[1] * ((1.0 - RIDCOL) + vrnd() * RIDCOL),
 | 
			
		||||
	  c[2] * ((1.0 - RIDCOL) + vrnd() * RIDCOL), 1.0);
 | 
			
		||||
   vinit4(p->c[2], c[0] * ((1.0 - RIDCOL) + vrnd() * RIDCOL),
 | 
			
		||||
	  c[1] * ((1.0 - RIDCOL) + vrnd() * RIDCOL),
 | 
			
		||||
	  c[2] * ((1.0 - RIDCOL) + vrnd() * RIDCOL), 1.0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
setpart(part * p)
 | 
			
		||||
{
 | 
			
		||||
   float fact;
 | 
			
		||||
 | 
			
		||||
   if (p->p[0][1] < 0.1) {
 | 
			
		||||
      setnewpart(p);
 | 
			
		||||
      return;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   p->v[1] += AGRAV * dt;
 | 
			
		||||
 | 
			
		||||
   vadds(p->p[0], dt, p->v);
 | 
			
		||||
   vadds(p->p[1], dt, p->v);
 | 
			
		||||
   vadds(p->p[2], dt, p->v);
 | 
			
		||||
 | 
			
		||||
   p->age++;
 | 
			
		||||
 | 
			
		||||
   if ((p->age) > maxage) {
 | 
			
		||||
      vequ(p->c[0], blu2);
 | 
			
		||||
      vequ(p->c[1], blu2);
 | 
			
		||||
      vequ(p->c[2], blu2);
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      fact = 1.0 / maxage;
 | 
			
		||||
      vadds(p->c[0], fact, blu2);
 | 
			
		||||
      vclamp(p->c[0]);
 | 
			
		||||
      p->c[0][3] = fact * (maxage - p->age);
 | 
			
		||||
 | 
			
		||||
      vadds(p->c[1], fact, blu2);
 | 
			
		||||
      vclamp(p->c[1]);
 | 
			
		||||
      p->c[1][3] = fact * (maxage - p->age);
 | 
			
		||||
 | 
			
		||||
      vadds(p->c[2], fact, blu2);
 | 
			
		||||
      vclamp(p->c[2]);
 | 
			
		||||
      p->c[2][3] = fact * (maxage - p->age);
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
drawtree(float x, float y, float z)
 | 
			
		||||
{
 | 
			
		||||
   glBegin(GL_QUADS);
 | 
			
		||||
   glTexCoord2f(0.0, 0.0);
 | 
			
		||||
   glVertex3f(x - 1.5, y + 0.0, z);
 | 
			
		||||
 | 
			
		||||
   glTexCoord2f(1.0, 0.0);
 | 
			
		||||
   glVertex3f(x + 1.5, y + 0.0, z);
 | 
			
		||||
 | 
			
		||||
   glTexCoord2f(1.0, 1.0);
 | 
			
		||||
   glVertex3f(x + 1.5, y + 3.0, z);
 | 
			
		||||
 | 
			
		||||
   glTexCoord2f(0.0, 1.0);
 | 
			
		||||
   glVertex3f(x - 1.5, y + 3.0, z);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   glTexCoord2f(0.0, 0.0);
 | 
			
		||||
   glVertex3f(x, y + 0.0, z - 1.5);
 | 
			
		||||
 | 
			
		||||
   glTexCoord2f(1.0, 0.0);
 | 
			
		||||
   glVertex3f(x, y + 0.0, z + 1.5);
 | 
			
		||||
 | 
			
		||||
   glTexCoord2f(1.0, 1.0);
 | 
			
		||||
   glVertex3f(x, y + 3.0, z + 1.5);
 | 
			
		||||
 | 
			
		||||
   glTexCoord2f(0.0, 1.0);
 | 
			
		||||
   glVertex3f(x, y + 3.0, z - 1.5);
 | 
			
		||||
 | 
			
		||||
   glEnd();
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
calcposobs(void)
 | 
			
		||||
{
 | 
			
		||||
   dir[0] = sin(alpha * M_PI / 180.0);
 | 
			
		||||
   dir[2] = cos(alpha * M_PI / 180.0) * sin(beta * M_PI / 180.0);
 | 
			
		||||
   dir[1] = cos(beta * M_PI / 180.0);
 | 
			
		||||
 | 
			
		||||
   if (dir[0] < 1.0e-5 && dir[0] > -1.0e-5)
 | 
			
		||||
      dir[0] = 0;
 | 
			
		||||
   if (dir[1] < 1.0e-5 && dir[1] > -1.0e-5)
 | 
			
		||||
      dir[1] = 0;
 | 
			
		||||
   if (dir[2] < 1.0e-5 && dir[2] > -1.0e-5)
 | 
			
		||||
      dir[2] = 0;
 | 
			
		||||
 | 
			
		||||
   obs[0] += v * dir[0];
 | 
			
		||||
   obs[1] += v * dir[1];
 | 
			
		||||
   obs[2] += v * dir[2];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
printstring(void *font, char *string)
 | 
			
		||||
{
 | 
			
		||||
   int len, i;
 | 
			
		||||
 | 
			
		||||
   len = (int) strlen(string);
 | 
			
		||||
   for (i = 0; i < len; i++)
 | 
			
		||||
      glutBitmapCharacter(font, string[i]);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
reshape(int width, int height)
 | 
			
		||||
{
 | 
			
		||||
   WIDTH = width;
 | 
			
		||||
   HEIGHT = height;
 | 
			
		||||
   glViewport(0, 0, (GLint) width, (GLint) height);
 | 
			
		||||
   glMatrixMode(GL_PROJECTION);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   gluPerspective(70.0, width / (float) height, 0.1, 30.0);
 | 
			
		||||
 | 
			
		||||
   glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
printhelp(void)
 | 
			
		||||
{
 | 
			
		||||
   glColor4f(0.0, 0.0, 0.0, 0.5);
 | 
			
		||||
   glRecti(40, 40, 600, 440);
 | 
			
		||||
 | 
			
		||||
   glColor3f(1.0, 0.0, 0.0);
 | 
			
		||||
   glRasterPos2i(300, 420);
 | 
			
		||||
   printstring(GLUT_BITMAP_TIMES_ROMAN_24, "Help");
 | 
			
		||||
 | 
			
		||||
   glRasterPos2i(60, 390);
 | 
			
		||||
   printstring(GLUT_BITMAP_TIMES_ROMAN_24, "h - Togle Help");
 | 
			
		||||
 | 
			
		||||
   glRasterPos2i(60, 360);
 | 
			
		||||
   printstring(GLUT_BITMAP_TIMES_ROMAN_24, "t - Increase particle size");
 | 
			
		||||
   glRasterPos2i(60, 330);
 | 
			
		||||
   printstring(GLUT_BITMAP_TIMES_ROMAN_24, "T - Decrease particle size");
 | 
			
		||||
 | 
			
		||||
   glRasterPos2i(60, 300);
 | 
			
		||||
   printstring(GLUT_BITMAP_TIMES_ROMAN_24, "r - Increase emission radius");
 | 
			
		||||
   glRasterPos2i(60, 270);
 | 
			
		||||
   printstring(GLUT_BITMAP_TIMES_ROMAN_24, "R - Decrease emission radius");
 | 
			
		||||
 | 
			
		||||
   glRasterPos2i(60, 240);
 | 
			
		||||
   printstring(GLUT_BITMAP_TIMES_ROMAN_24, "f - Togle Fog");
 | 
			
		||||
   glRasterPos2i(60, 210);
 | 
			
		||||
   printstring(GLUT_BITMAP_TIMES_ROMAN_24, "s - Togle shadows");
 | 
			
		||||
   glRasterPos2i(60, 180);
 | 
			
		||||
   printstring(GLUT_BITMAP_TIMES_ROMAN_24, "Arrow Keys - Rotate");
 | 
			
		||||
   glRasterPos2i(60, 150);
 | 
			
		||||
   printstring(GLUT_BITMAP_TIMES_ROMAN_24, "a - Increase velocity");
 | 
			
		||||
   glRasterPos2i(60, 120);
 | 
			
		||||
   printstring(GLUT_BITMAP_TIMES_ROMAN_24, "z - Decrease velocity");
 | 
			
		||||
 | 
			
		||||
   glRasterPos2i(60, 90);
 | 
			
		||||
   if (joyavailable)
 | 
			
		||||
      printstring(GLUT_BITMAP_TIMES_ROMAN_24,
 | 
			
		||||
		  "j - Togle jostick control (Joystick control available)");
 | 
			
		||||
   else
 | 
			
		||||
      printstring(GLUT_BITMAP_TIMES_ROMAN_24,
 | 
			
		||||
		  "(No Joystick control available)");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
dojoy(void)
 | 
			
		||||
{
 | 
			
		||||
#ifdef WIN32
 | 
			
		||||
   static UINT max[2] = { 0, 0 };
 | 
			
		||||
   static UINT min[2] = { 0xffffffff, 0xffffffff }, center[2];
 | 
			
		||||
   MMRESULT res;
 | 
			
		||||
   JOYINFO joy;
 | 
			
		||||
 | 
			
		||||
   res = joyGetPos(JOYSTICKID1, &joy);
 | 
			
		||||
 | 
			
		||||
   if (res == JOYERR_NOERROR) {
 | 
			
		||||
      joyavailable = 1;
 | 
			
		||||
 | 
			
		||||
      if (max[0] < joy.wXpos)
 | 
			
		||||
	 max[0] = joy.wXpos;
 | 
			
		||||
      if (min[0] > joy.wXpos)
 | 
			
		||||
	 min[0] = joy.wXpos;
 | 
			
		||||
      center[0] = (max[0] + min[0]) / 2;
 | 
			
		||||
 | 
			
		||||
      if (max[1] < joy.wYpos)
 | 
			
		||||
	 max[1] = joy.wYpos;
 | 
			
		||||
      if (min[1] > joy.wYpos)
 | 
			
		||||
	 min[1] = joy.wYpos;
 | 
			
		||||
      center[1] = (max[1] + min[1]) / 2;
 | 
			
		||||
 | 
			
		||||
      if (joyactive) {
 | 
			
		||||
	 if (fabs(center[0] - (float) joy.wXpos) > 0.1 * (max[0] - min[0]))
 | 
			
		||||
	    alpha +=
 | 
			
		||||
	       2.5 * (center[0] - (float) joy.wXpos) / (max[0] - min[0]);
 | 
			
		||||
	 if (fabs(center[1] - (float) joy.wYpos) > 0.1 * (max[1] - min[1]))
 | 
			
		||||
	    beta += 2.5 * (center[1] - (float) joy.wYpos) / (max[1] - min[1]);
 | 
			
		||||
 | 
			
		||||
	 if (joy.wButtons & JOY_BUTTON1)
 | 
			
		||||
	    v += 0.01;
 | 
			
		||||
	 if (joy.wButtons & JOY_BUTTON2)
 | 
			
		||||
	    v -= 0.01;
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
   else
 | 
			
		||||
      joyavailable = 0;
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
drawfire(void)
 | 
			
		||||
{
 | 
			
		||||
   static char frbuf[80] = "";
 | 
			
		||||
   int j;
 | 
			
		||||
 | 
			
		||||
   dojoy();
 | 
			
		||||
 | 
			
		||||
   if (NiceFog)
 | 
			
		||||
      glHint(GL_FOG_HINT, GL_NICEST);
 | 
			
		||||
   else
 | 
			
		||||
      glHint(GL_FOG_HINT, GL_DONT_CARE);
 | 
			
		||||
 | 
			
		||||
   glEnable(GL_DEPTH_TEST);
 | 
			
		||||
 | 
			
		||||
   if (fog)
 | 
			
		||||
      glEnable(GL_FOG);
 | 
			
		||||
   else
 | 
			
		||||
      glDisable(GL_FOG);
 | 
			
		||||
 | 
			
		||||
   glDepthMask(GL_TRUE);
 | 
			
		||||
   glClearColor(1.0, 1.0, 1.0, 1.0);
 | 
			
		||||
   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 | 
			
		||||
 | 
			
		||||
   glPushMatrix();
 | 
			
		||||
   calcposobs();
 | 
			
		||||
   gluLookAt(obs[0], obs[1], obs[2],
 | 
			
		||||
	     obs[0] + dir[0], obs[1] + dir[1], obs[2] + dir[2],
 | 
			
		||||
	     0.0, 1.0, 0.0);
 | 
			
		||||
 | 
			
		||||
   glColor4f(1.0, 1.0, 1.0, 1.0);
 | 
			
		||||
 | 
			
		||||
   glEnable(GL_TEXTURE_2D);
 | 
			
		||||
 | 
			
		||||
   glBindTexture(GL_TEXTURE_2D, groundid);
 | 
			
		||||
#if 1
 | 
			
		||||
   glBegin(GL_QUADS);
 | 
			
		||||
   glTexCoord2fv(qt[0]);
 | 
			
		||||
   glVertex3fv(q[0]);
 | 
			
		||||
   glTexCoord2fv(qt[1]);
 | 
			
		||||
   glVertex3fv(q[1]);
 | 
			
		||||
   glTexCoord2fv(qt[2]);
 | 
			
		||||
   glVertex3fv(q[2]);
 | 
			
		||||
   glTexCoord2fv(qt[3]);
 | 
			
		||||
   glVertex3fv(q[3]);
 | 
			
		||||
   glEnd();
 | 
			
		||||
#else
 | 
			
		||||
   /* Subdivide the ground into a bunch of quads.  This improves fog
 | 
			
		||||
    * if GL_FOG_HINT != GL_NICEST
 | 
			
		||||
    */
 | 
			
		||||
   {
 | 
			
		||||
      float x, y;
 | 
			
		||||
      float dx = 1.0, dy = 1.0;
 | 
			
		||||
      glBegin(GL_QUADS);
 | 
			
		||||
      for (y = -DIMP; y < DIMP; y += 1.0) {
 | 
			
		||||
         for (x = -DIMP; x < DIMP; x += 1.0) {
 | 
			
		||||
            glTexCoord2f(0, 0);   glVertex3f(x, 0, y);
 | 
			
		||||
            glTexCoord2f(1, 0);   glVertex3f(x+dx, 0, y);
 | 
			
		||||
            glTexCoord2f(1, 1);   glVertex3f(x+dx, 0, y+dy);
 | 
			
		||||
            glTexCoord2f(0, 1);   glVertex3f(x, 0, y+dy);
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
      glEnd();
 | 
			
		||||
   }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   glEnable(GL_ALPHA_TEST);
 | 
			
		||||
   glAlphaFunc(GL_GEQUAL, 0.9);
 | 
			
		||||
 | 
			
		||||
   glBindTexture(GL_TEXTURE_2D, treeid);
 | 
			
		||||
   for (j = 0; j < NUMTREE; j++)
 | 
			
		||||
      drawtree(treepos[j][0], treepos[j][1], treepos[j][2]);
 | 
			
		||||
 | 
			
		||||
   glDisable(GL_TEXTURE_2D);
 | 
			
		||||
   glDepthMask(GL_FALSE);
 | 
			
		||||
   glDisable(GL_ALPHA_TEST);
 | 
			
		||||
 | 
			
		||||
   if (shadows) {
 | 
			
		||||
      glBegin(GL_TRIANGLES);
 | 
			
		||||
      for (j = 0; j < np; j++) {
 | 
			
		||||
	 glColor4f(black[0], black[1], black[2], p[j].c[0][3]);
 | 
			
		||||
	 glVertex3f(p[j].p[0][0], 0.1, p[j].p[0][2]);
 | 
			
		||||
 | 
			
		||||
	 glColor4f(black[0], black[1], black[2], p[j].c[1][3]);
 | 
			
		||||
	 glVertex3f(p[j].p[1][0], 0.1, p[j].p[1][2]);
 | 
			
		||||
 | 
			
		||||
	 glColor4f(black[0], black[1], black[2], p[j].c[2][3]);
 | 
			
		||||
	 glVertex3f(p[j].p[2][0], 0.1, p[j].p[2][2]);
 | 
			
		||||
      }
 | 
			
		||||
      glEnd();
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glBegin(GL_TRIANGLES);
 | 
			
		||||
   for (j = 0; j < np; j++) {
 | 
			
		||||
      glColor4fv(p[j].c[0]);
 | 
			
		||||
      glVertex3fv(p[j].p[0]);
 | 
			
		||||
 | 
			
		||||
      glColor4fv(p[j].c[1]);
 | 
			
		||||
      glVertex3fv(p[j].p[1]);
 | 
			
		||||
 | 
			
		||||
      glColor4fv(p[j].c[2]);
 | 
			
		||||
      glVertex3fv(p[j].p[2]);
 | 
			
		||||
 | 
			
		||||
      setpart(&p[j]);
 | 
			
		||||
   }
 | 
			
		||||
   glEnd();
 | 
			
		||||
 | 
			
		||||
   glDisable(GL_TEXTURE_2D);
 | 
			
		||||
   glDisable(GL_ALPHA_TEST);
 | 
			
		||||
   glDisable(GL_DEPTH_TEST);
 | 
			
		||||
   glDisable(GL_FOG);
 | 
			
		||||
 | 
			
		||||
   glMatrixMode(GL_PROJECTION);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glOrtho(-0.5, 639.5, -0.5, 479.5, -1.0, 1.0);
 | 
			
		||||
   glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
 | 
			
		||||
   glColor3f(1.0, 0.0, 0.0);
 | 
			
		||||
   glRasterPos2i(10, 10);
 | 
			
		||||
   printstring(GLUT_BITMAP_HELVETICA_18, frbuf);
 | 
			
		||||
   glRasterPos2i(370, 470);
 | 
			
		||||
   printstring(GLUT_BITMAP_HELVETICA_10,
 | 
			
		||||
	       "Fire V1.5 Written by David Bucciarelli (tech.hmw@plus.it)");
 | 
			
		||||
 | 
			
		||||
   if (help)
 | 
			
		||||
      printhelp();
 | 
			
		||||
 | 
			
		||||
   reshape(WIDTH, HEIGHT);
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
 | 
			
		||||
   glutSwapBuffers();
 | 
			
		||||
 | 
			
		||||
   Frames++;
 | 
			
		||||
   {
 | 
			
		||||
      GLint t = glutGet(GLUT_ELAPSED_TIME);
 | 
			
		||||
      if (t - T0 >= 2000) {
 | 
			
		||||
         GLfloat seconds = (t - T0) / 1000.0;
 | 
			
		||||
         GLfloat fps = Frames / seconds;
 | 
			
		||||
         sprintf(frbuf, "Frame rate: %f", fps);
 | 
			
		||||
         T0 = t;
 | 
			
		||||
         Frames = 0;
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
idle(void)
 | 
			
		||||
{
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
special(int key, int x, int y)
 | 
			
		||||
{
 | 
			
		||||
   switch (key) {
 | 
			
		||||
   case GLUT_KEY_LEFT:
 | 
			
		||||
      alpha += 2.0;
 | 
			
		||||
      break;
 | 
			
		||||
   case GLUT_KEY_RIGHT:
 | 
			
		||||
      alpha -= 2.0;
 | 
			
		||||
      break;
 | 
			
		||||
   case GLUT_KEY_DOWN:
 | 
			
		||||
      beta -= 2.0;
 | 
			
		||||
      break;
 | 
			
		||||
   case GLUT_KEY_UP:
 | 
			
		||||
      beta += 2.0;
 | 
			
		||||
      break;
 | 
			
		||||
   }
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
key(unsigned char key, int x, int y)
 | 
			
		||||
{
 | 
			
		||||
   switch (key) {
 | 
			
		||||
   case 27:
 | 
			
		||||
      exit(0);
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
   case 'a':
 | 
			
		||||
      v += 0.01;
 | 
			
		||||
      break;
 | 
			
		||||
   case 'z':
 | 
			
		||||
      v -= 0.01;
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
   case 'j':
 | 
			
		||||
      joyactive = (!joyactive);
 | 
			
		||||
      break;
 | 
			
		||||
   case 'h':
 | 
			
		||||
      help = (!help);
 | 
			
		||||
      break;
 | 
			
		||||
   case 'f':
 | 
			
		||||
      fog = (!fog);
 | 
			
		||||
      break;
 | 
			
		||||
   case 's':
 | 
			
		||||
      shadows = !shadows;
 | 
			
		||||
      break;
 | 
			
		||||
   case 'R':
 | 
			
		||||
      eject_r -= 0.03;
 | 
			
		||||
      break;
 | 
			
		||||
   case 'r':
 | 
			
		||||
      eject_r += 0.03;
 | 
			
		||||
      break;
 | 
			
		||||
   case 't':
 | 
			
		||||
      ridtri += 0.005;
 | 
			
		||||
      break;
 | 
			
		||||
   case 'T':
 | 
			
		||||
      ridtri -= 0.005;
 | 
			
		||||
      break;
 | 
			
		||||
#ifdef XMESA
 | 
			
		||||
   case ' ':
 | 
			
		||||
      XMesaSetFXmode(fullscreen ? XMESA_FX_FULLSCREEN : XMESA_FX_WINDOW);
 | 
			
		||||
      fullscreen = (!fullscreen);
 | 
			
		||||
      break;
 | 
			
		||||
#endif
 | 
			
		||||
   case 'n':
 | 
			
		||||
      NiceFog = !NiceFog;
 | 
			
		||||
      printf("NiceFog %d\n", NiceFog);
 | 
			
		||||
      break;
 | 
			
		||||
   }
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
inittextures(void)
 | 
			
		||||
{
 | 
			
		||||
   GLenum gluerr;
 | 
			
		||||
   GLubyte tex[128][128][4];
 | 
			
		||||
 | 
			
		||||
   glGenTextures(1, &groundid);
 | 
			
		||||
   glBindTexture(GL_TEXTURE_2D, groundid);
 | 
			
		||||
 | 
			
		||||
   glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
 | 
			
		||||
   if (!LoadRGBMipmaps("../images/s128.rgb", GL_RGB)) {
 | 
			
		||||
      fprintf(stderr, "Error reading a texture.\n");
 | 
			
		||||
      exit(-1);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
 | 
			
		||||
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
 | 
			
		||||
		   GL_LINEAR_MIPMAP_LINEAR);
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 | 
			
		||||
 | 
			
		||||
   glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
 | 
			
		||||
 | 
			
		||||
   glGenTextures(1, &treeid);
 | 
			
		||||
   glBindTexture(GL_TEXTURE_2D, treeid);
 | 
			
		||||
 | 
			
		||||
   if (1)
 | 
			
		||||
   {
 | 
			
		||||
      int w, h;
 | 
			
		||||
      GLenum format;
 | 
			
		||||
      int x, y;
 | 
			
		||||
      GLubyte *image = LoadRGBImage("../images/tree3.rgb", &w, &h, &format);
 | 
			
		||||
 | 
			
		||||
      if (!image) {
 | 
			
		||||
	 fprintf(stderr, "Error reading a texture.\n");
 | 
			
		||||
	 exit(-1);
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      for (y = 0; y < 128; y++)
 | 
			
		||||
	 for (x = 0; x < 128; x++) {
 | 
			
		||||
	    tex[x][y][0] = image[(y + x * 128) * 3];
 | 
			
		||||
	    tex[x][y][1] = image[(y + x * 128) * 3 + 1];
 | 
			
		||||
	    tex[x][y][2] = image[(y + x * 128) * 3 + 2];
 | 
			
		||||
	    if ((tex[x][y][0] == tex[x][y][1]) &&
 | 
			
		||||
		(tex[x][y][1] == tex[x][y][2]) && (tex[x][y][2] == 255))
 | 
			
		||||
	       tex[x][y][3] = 0;
 | 
			
		||||
	    else
 | 
			
		||||
	       tex[x][y][3] = 255;
 | 
			
		||||
	 }
 | 
			
		||||
 | 
			
		||||
      if ((gluerr = gluBuild2DMipmaps(GL_TEXTURE_2D, 4, 128, 128, GL_RGBA,
 | 
			
		||||
				      GL_UNSIGNED_BYTE, (GLvoid *) (tex)))) {
 | 
			
		||||
	 fprintf(stderr, "GLULib%s\n", gluErrorString(gluerr));
 | 
			
		||||
	 exit(-1);
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      if (!LoadRGBMipmaps("../images/tree2.rgba", GL_RGBA)) {
 | 
			
		||||
	 fprintf(stderr, "Error reading a texture.\n");
 | 
			
		||||
	 exit(-1);
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
 | 
			
		||||
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
 | 
			
		||||
		   GL_LINEAR_MIPMAP_LINEAR);
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 | 
			
		||||
 | 
			
		||||
   glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
inittree(void)
 | 
			
		||||
{
 | 
			
		||||
   int i;
 | 
			
		||||
   float dist;
 | 
			
		||||
 | 
			
		||||
   for (i = 0; i < NUMTREE; i++)
 | 
			
		||||
      do {
 | 
			
		||||
	 treepos[i][0] = vrnd() * TREEOUTR * 2.0 - TREEOUTR;
 | 
			
		||||
	 treepos[i][1] = 0.0;
 | 
			
		||||
	 treepos[i][2] = vrnd() * TREEOUTR * 2.0 - TREEOUTR;
 | 
			
		||||
	 dist =
 | 
			
		||||
	    sqrt(treepos[i][0] * treepos[i][0] +
 | 
			
		||||
		 treepos[i][2] * treepos[i][2]);
 | 
			
		||||
      } while ((dist < TREEINR) || (dist > TREEOUTR));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int
 | 
			
		||||
main(int ac, char **av)
 | 
			
		||||
{
 | 
			
		||||
   int i;
 | 
			
		||||
 | 
			
		||||
   fprintf(stderr,
 | 
			
		||||
	   "Fire V1.5\nWritten by David Bucciarelli (tech.hmw@plus.it)\n");
 | 
			
		||||
 | 
			
		||||
   /* Default settings */
 | 
			
		||||
 | 
			
		||||
   np = 800;
 | 
			
		||||
   eject_r = 0.1;
 | 
			
		||||
   dt = 0.015;
 | 
			
		||||
   eject_vy = 4;
 | 
			
		||||
   eject_vl = 1;
 | 
			
		||||
   shadows = 1;
 | 
			
		||||
   ridtri = 0.1;
 | 
			
		||||
 | 
			
		||||
   maxage = 1.0 / dt;
 | 
			
		||||
 | 
			
		||||
   if (ac == 2)
 | 
			
		||||
      np = atoi(av[1]);
 | 
			
		||||
 | 
			
		||||
   if (ac == 4) {
 | 
			
		||||
      WIDTH = atoi(av[2]);
 | 
			
		||||
      HEIGHT = atoi(av[3]);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glutInitWindowPosition(0, 0);
 | 
			
		||||
   glutInitWindowSize(WIDTH, HEIGHT);
 | 
			
		||||
   glutInit(&ac, av);
 | 
			
		||||
 | 
			
		||||
   glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
 | 
			
		||||
 | 
			
		||||
   if (!(win = glutCreateWindow("Fire"))) {
 | 
			
		||||
      fprintf(stderr, "Error opening a window.\n");
 | 
			
		||||
      exit(-1);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   reshape(WIDTH, HEIGHT);
 | 
			
		||||
 | 
			
		||||
   inittextures();
 | 
			
		||||
 | 
			
		||||
   glShadeModel(GL_FLAT);
 | 
			
		||||
   glEnable(GL_DEPTH_TEST);
 | 
			
		||||
 | 
			
		||||
   glEnable(GL_BLEND);
 | 
			
		||||
   glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 | 
			
		||||
 | 
			
		||||
   glEnable(GL_FOG);
 | 
			
		||||
   glFogi(GL_FOG_MODE, GL_EXP);
 | 
			
		||||
   glFogfv(GL_FOG_COLOR, fogcolor);
 | 
			
		||||
   glFogf(GL_FOG_DENSITY, 0.1);
 | 
			
		||||
 | 
			
		||||
   p = (part *) malloc(sizeof(part) * np);
 | 
			
		||||
 | 
			
		||||
   for (i = 0; i < np; i++)
 | 
			
		||||
      setnewpart(&p[i]);
 | 
			
		||||
 | 
			
		||||
   inittree();
 | 
			
		||||
 | 
			
		||||
   glutKeyboardFunc(key);
 | 
			
		||||
   glutSpecialFunc(special);
 | 
			
		||||
   glutDisplayFunc(drawfire);
 | 
			
		||||
   glutIdleFunc(idle);
 | 
			
		||||
   glutReshapeFunc(reshape);
 | 
			
		||||
   glutMainLoop();
 | 
			
		||||
 | 
			
		||||
   return (0);
 | 
			
		||||
}
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
 | 
			
		||||
/* $Id: gamma.c,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
 | 
			
		||||
/* $Id: gamma.c,v 1.2 2000/03/18 01:13:29 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/* Draw test patterns to help determine correct gamma value for a display.
 | 
			
		||||
   When the intensities of the inner squares nearly match the intensities
 | 
			
		||||
@@ -25,8 +25,11 @@
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: gamma.c,v $
 | 
			
		||||
 * Revision 1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Initial revision
 | 
			
		||||
 * Revision 1.2  2000/03/18 01:13:29  brianp
 | 
			
		||||
 * colors were computed incorrectly (Hans Nelles)
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.1.1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Imported sources
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.1  1999/06/19 01:35:38  brianp
 | 
			
		||||
 * merged in Kai Schuetz's RGB changes
 | 
			
		||||
@@ -130,8 +133,9 @@ gamma_ramp(GLfloat yoffs, GLfloat r, GLfloat g, GLfloat b)
 | 
			
		||||
 | 
			
		||||
  for(d = 1; d < 4; d++) {  /* increasing density from 25% to 75% */
 | 
			
		||||
    GLfloat xcoord = (-1.0 + d*0.4);
 | 
			
		||||
    GLfloat t = d * 0.25;
 | 
			
		||||
 | 
			
		||||
    glColor3f(r*d / 5.0, g*d / 5.0, b*d / 5.0); /* draw outer rect */
 | 
			
		||||
    glColor3f(r*t, g*t, b*t); /* draw outer rect */
 | 
			
		||||
    glRectf(xcoord, yoffs, xcoord+0.4, yoffs + 0.5);
 | 
			
		||||
 | 
			
		||||
    glColor3f(0.0, 0.0, 0.0);   /* "clear" inner rect */
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,11 @@
 | 
			
		||||
/* $Id: gears.c,v 1.2 1999/10/21 16:39:06 brianp Exp $ */
 | 
			
		||||
/* $Id: gears.c,v 1.6 2000/04/06 02:22:59 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * 3-D gear wheels.  This program is in the public domain.
 | 
			
		||||
 *
 | 
			
		||||
 * Command line options:
 | 
			
		||||
 *    -info      print GL implementation information
 | 
			
		||||
 *    -exit      automatically exit after 30 seconds
 | 
			
		||||
 *
 | 
			
		||||
 *
 | 
			
		||||
 * Brian Paul
 | 
			
		||||
@@ -12,24 +13,6 @@
 | 
			
		||||
 | 
			
		||||
/* Conversion to GLUT by Mark J. Kilgard */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: gears.c,v $
 | 
			
		||||
 * Revision 1.2  1999/10/21 16:39:06  brianp
 | 
			
		||||
 * added -info command line option
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.1.1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Imported sources
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.2  1999/06/03 17:07:36  brianp
 | 
			
		||||
 * an extra quad was being drawn in front and back faces
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.1  1998/11/03 02:49:10  brianp
 | 
			
		||||
 * added fps output
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.0  1998/02/14 18:42:29  brianp
 | 
			
		||||
 * initial rev
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <math.h>
 | 
			
		||||
@@ -44,7 +27,7 @@
 | 
			
		||||
 | 
			
		||||
static GLint T0 = 0;
 | 
			
		||||
static GLint Frames = 0;
 | 
			
		||||
 | 
			
		||||
static GLint autoexit = 0;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
@@ -187,41 +170,44 @@ draw(void)
 | 
			
		||||
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 | 
			
		||||
 | 
			
		||||
  glPushMatrix();
 | 
			
		||||
  glRotatef(view_rotx, 1.0, 0.0, 0.0);
 | 
			
		||||
  glRotatef(view_roty, 0.0, 1.0, 0.0);
 | 
			
		||||
  glRotatef(view_rotz, 0.0, 0.0, 1.0);
 | 
			
		||||
    glRotatef(view_rotx, 1.0, 0.0, 0.0);
 | 
			
		||||
    glRotatef(view_roty, 0.0, 1.0, 0.0);
 | 
			
		||||
    glRotatef(view_rotz, 0.0, 0.0, 1.0);
 | 
			
		||||
 | 
			
		||||
  glPushMatrix();
 | 
			
		||||
  glTranslatef(-3.0, -2.0, 0.0);
 | 
			
		||||
  glRotatef(angle, 0.0, 0.0, 1.0);
 | 
			
		||||
  glCallList(gear1);
 | 
			
		||||
  glPopMatrix();
 | 
			
		||||
    glPushMatrix();
 | 
			
		||||
      glTranslatef(-3.0, -2.0, 0.0);
 | 
			
		||||
      glRotatef(angle, 0.0, 0.0, 1.0);
 | 
			
		||||
      glCallList(gear1);
 | 
			
		||||
    glPopMatrix();
 | 
			
		||||
 | 
			
		||||
  glPushMatrix();
 | 
			
		||||
  glTranslatef(3.1, -2.0, 0.0);
 | 
			
		||||
  glRotatef(-2.0 * angle - 9.0, 0.0, 0.0, 1.0);
 | 
			
		||||
  glCallList(gear2);
 | 
			
		||||
  glPopMatrix();
 | 
			
		||||
    glPushMatrix();
 | 
			
		||||
      glTranslatef(3.1, -2.0, 0.0);
 | 
			
		||||
      glRotatef(-2.0 * angle - 9.0, 0.0, 0.0, 1.0);
 | 
			
		||||
      glCallList(gear2);
 | 
			
		||||
    glPopMatrix();
 | 
			
		||||
 | 
			
		||||
  glPushMatrix();
 | 
			
		||||
  glTranslatef(-3.1, 4.2, 0.0);
 | 
			
		||||
  glRotatef(-2.0 * angle - 25.0, 0.0, 0.0, 1.0);
 | 
			
		||||
  glCallList(gear3);
 | 
			
		||||
  glPopMatrix();
 | 
			
		||||
    glPushMatrix();
 | 
			
		||||
      glTranslatef(-3.1, 4.2, 0.0);
 | 
			
		||||
      glRotatef(-2.0 * angle - 25.0, 0.0, 0.0, 1.0);
 | 
			
		||||
      glCallList(gear3);
 | 
			
		||||
    glPopMatrix();
 | 
			
		||||
 | 
			
		||||
  glPopMatrix();
 | 
			
		||||
 | 
			
		||||
  glutSwapBuffers();
 | 
			
		||||
 | 
			
		||||
  Frames++;
 | 
			
		||||
 | 
			
		||||
  {
 | 
			
		||||
     GLint t = glutGet(GLUT_ELAPSED_TIME);
 | 
			
		||||
     if (t - T0 >= 5000) {
 | 
			
		||||
        GLfloat seconds = (t - T0) / 1000.0;
 | 
			
		||||
        GLfloat fps = Frames / seconds;
 | 
			
		||||
        printf("%d frames in %g seconds = %g FPS\n", Frames, seconds, fps);
 | 
			
		||||
        printf("%d frames in %6.3f seconds = %6.3f FPS\n", Frames, seconds, fps);
 | 
			
		||||
        T0 = t;
 | 
			
		||||
        Frames = 0;
 | 
			
		||||
        if ((t >= 999.0 * autoexit) && (autoexit))
 | 
			
		||||
           exit(0);
 | 
			
		||||
     }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
@@ -297,14 +283,11 @@ reshape(int width, int height)
 | 
			
		||||
static void
 | 
			
		||||
init(int argc, char *argv[])
 | 
			
		||||
{
 | 
			
		||||
  static GLfloat pos[4] =
 | 
			
		||||
  {5.0, 5.0, 10.0, 0.0};
 | 
			
		||||
  static GLfloat red[4] =
 | 
			
		||||
  {0.8, 0.1, 0.0, 1.0};
 | 
			
		||||
  static GLfloat green[4] =
 | 
			
		||||
  {0.0, 0.8, 0.2, 1.0};
 | 
			
		||||
  static GLfloat blue[4] =
 | 
			
		||||
  {0.2, 0.2, 1.0, 1.0};
 | 
			
		||||
  static GLfloat pos[4] = {5.0, 5.0, 10.0, 0.0};
 | 
			
		||||
  static GLfloat red[4] = {0.8, 0.1, 0.0, 1.0};
 | 
			
		||||
  static GLfloat green[4] = {0.0, 0.8, 0.2, 1.0};
 | 
			
		||||
  static GLfloat blue[4] = {0.2, 0.2, 1.0, 1.0};
 | 
			
		||||
  GLint i;
 | 
			
		||||
 | 
			
		||||
  glLightfv(GL_LIGHT0, GL_POSITION, pos);
 | 
			
		||||
  glEnable(GL_CULL_FACE);
 | 
			
		||||
@@ -333,15 +316,21 @@ init(int argc, char *argv[])
 | 
			
		||||
 | 
			
		||||
  glEnable(GL_NORMALIZE);
 | 
			
		||||
 | 
			
		||||
  if (argc > 1 && strcmp(argv[1], "-info")==0) {
 | 
			
		||||
     printf("GL_RENDERER   = %s\n", (char *) glGetString(GL_RENDERER));
 | 
			
		||||
     printf("GL_VERSION    = %s\n", (char *) glGetString(GL_VERSION));
 | 
			
		||||
     printf("GL_VENDOR     = %s\n", (char *) glGetString(GL_VENDOR));
 | 
			
		||||
     printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS));
 | 
			
		||||
  for ( i=1; i<argc; i++ ) {
 | 
			
		||||
    if (strcmp(argv[i], "-info")==0) {
 | 
			
		||||
      printf("GL_RENDERER   = %s\n", (char *) glGetString(GL_RENDERER));
 | 
			
		||||
      printf("GL_VERSION    = %s\n", (char *) glGetString(GL_VERSION));
 | 
			
		||||
      printf("GL_VENDOR     = %s\n", (char *) glGetString(GL_VENDOR));
 | 
			
		||||
      printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS));
 | 
			
		||||
    }
 | 
			
		||||
    else if ( strcmp(argv[i], "-exit")==0) {
 | 
			
		||||
      autoexit = 30;
 | 
			
		||||
      printf("Auto Exit after %i seconds.\n", autoexit );
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void 
 | 
			
		||||
static void 
 | 
			
		||||
visible(int vis)
 | 
			
		||||
{
 | 
			
		||||
  if (vis == GLUT_VISIBLE)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1070
									
								
								progs/demos/geartrain.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1070
									
								
								progs/demos/geartrain.c
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										119
									
								
								progs/demos/geartrain.dat
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										119
									
								
								progs/demos/geartrain.dat
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,119 @@
 | 
			
		||||
BACKGROUND = 0.000 0.500 0.700
 | 
			
		||||
 | 
			
		||||
ANAME = AXLE1
 | 
			
		||||
ARADIUS = 1.000
 | 
			
		||||
AAXIS = 2
 | 
			
		||||
APOSITION = -7.000 0.000 0.000
 | 
			
		||||
ACOLOR = 0.800 0.500 0.200
 | 
			
		||||
ALENGTH = 6.000
 | 
			
		||||
AMOTORED = 1
 | 
			
		||||
AANGULARVELOCITY = 2.000
 | 
			
		||||
ADIRECTION = 1
 | 
			
		||||
 | 
			
		||||
ANAME = AXLE2
 | 
			
		||||
ARADIUS = 1.000
 | 
			
		||||
AAXIS = 2
 | 
			
		||||
APOSITION = -3.000 0.000 0.000
 | 
			
		||||
ACOLOR = 0.800 0.500 0.200
 | 
			
		||||
ALENGTH = 12.000
 | 
			
		||||
AMOTORED = 0
 | 
			
		||||
 | 
			
		||||
ANAME = AXLE3
 | 
			
		||||
ARADIUS = 1.000
 | 
			
		||||
AAXIS = 2
 | 
			
		||||
APOSITION = 1.000 0.000 0.000
 | 
			
		||||
ACOLOR = 0.800 0.500 0.200
 | 
			
		||||
ALENGTH = 6.000
 | 
			
		||||
AMOTORED = 0
 | 
			
		||||
 | 
			
		||||
ANAME = AXLE4
 | 
			
		||||
ARADIUS = 1.000
 | 
			
		||||
AAXIS = 2
 | 
			
		||||
APOSITION = 8.000 0.000 0.000
 | 
			
		||||
ACOLOR = 0.800 0.500 0.200
 | 
			
		||||
ALENGTH = 18.000
 | 
			
		||||
AMOTORED = 0
 | 
			
		||||
 | 
			
		||||
ANAME = AXLE5
 | 
			
		||||
ARADIUS = 1.000
 | 
			
		||||
AAXIS = 1
 | 
			
		||||
APOSITION = 8.000 -8.200 -7.400
 | 
			
		||||
ACOLOR = 0.800 0.500 0.200
 | 
			
		||||
ALENGTH = 12.000
 | 
			
		||||
AMOTORED = 0
 | 
			
		||||
 | 
			
		||||
GNAME = GEAR1
 | 
			
		||||
GTYPE = NORMAL
 | 
			
		||||
GRADIUS = 2.200
 | 
			
		||||
GWIDTH = 3.000
 | 
			
		||||
GTEETH = 40
 | 
			
		||||
GTOOTHDEPTH = 0.500
 | 
			
		||||
GCOLOR = 0.500 0.500 0.500
 | 
			
		||||
GAXLE = AXLE1
 | 
			
		||||
GPOSITION = 0.000
 | 
			
		||||
 | 
			
		||||
GNAME = GEAR2
 | 
			
		||||
GTYPE = NORMAL
 | 
			
		||||
GRADIUS = 2.200
 | 
			
		||||
GWIDTH = 3.000
 | 
			
		||||
GTEETH = 30
 | 
			
		||||
GTOOTHDEPTH = 0.500
 | 
			
		||||
GCOLOR = 0.500 0.500 0.500
 | 
			
		||||
GAXLE = AXLE2
 | 
			
		||||
GPOSITION = 0.000
 | 
			
		||||
 | 
			
		||||
GNAME = GEAR3
 | 
			
		||||
GTYPE = NORMAL
 | 
			
		||||
GRADIUS = 2.200
 | 
			
		||||
GWIDTH = 3.000
 | 
			
		||||
GTEETH = 20
 | 
			
		||||
GTOOTHDEPTH = 0.500
 | 
			
		||||
GCOLOR = 0.500 0.500 0.500
 | 
			
		||||
GAXLE = AXLE3
 | 
			
		||||
GPOSITION = 0.000
 | 
			
		||||
 | 
			
		||||
GNAME = GEAR4
 | 
			
		||||
GTYPE = NORMAL
 | 
			
		||||
GRADIUS = 1.700
 | 
			
		||||
GWIDTH = 1.000
 | 
			
		||||
GTEETH = 20
 | 
			
		||||
GTOOTHDEPTH = 0.500
 | 
			
		||||
GCOLOR = 0.500 0.500 0.500
 | 
			
		||||
GAXLE = AXLE2
 | 
			
		||||
GPOSITION = 5.000
 | 
			
		||||
 | 
			
		||||
GNAME = GEAR5
 | 
			
		||||
GTYPE = NORMAL
 | 
			
		||||
GRADIUS = 3.000
 | 
			
		||||
GWIDTH = 1.000
 | 
			
		||||
GTEETH = 20
 | 
			
		||||
GTOOTHDEPTH = 0.500
 | 
			
		||||
GCOLOR = 0.500 0.500 0.500
 | 
			
		||||
GAXLE = AXLE4
 | 
			
		||||
GPOSITION = 5.000
 | 
			
		||||
 | 
			
		||||
GNAME = GEAR6
 | 
			
		||||
GTYPE = BEVEL
 | 
			
		||||
GFACE = 0
 | 
			
		||||
GRADIUS = 4.000
 | 
			
		||||
GWIDTH = 1.000
 | 
			
		||||
GTEETH = 20
 | 
			
		||||
GTOOTHDEPTH = 1.700
 | 
			
		||||
GCOLOR = 0.500 0.500 0.500
 | 
			
		||||
GAXLE = AXLE4
 | 
			
		||||
GPOSITION = -4.000
 | 
			
		||||
 | 
			
		||||
GNAME = GEAR7
 | 
			
		||||
GTYPE = BEVEL
 | 
			
		||||
GFACE = 0
 | 
			
		||||
GRADIUS = 4.000
 | 
			
		||||
GWIDTH = 1.000
 | 
			
		||||
GTEETH = 20
 | 
			
		||||
GTOOTHDEPTH = 1.700
 | 
			
		||||
GCOLOR = 0.500 0.500 0.500
 | 
			
		||||
GAXLE = AXLE5
 | 
			
		||||
GPOSITION = 5.000
 | 
			
		||||
 | 
			
		||||
BELTNAME = BELT1
 | 
			
		||||
GEAR1NAME = GEAR5
 | 
			
		||||
GEAR2NAME = GEAR4
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: gloss.c,v 1.3 1999/10/26 17:08:31 brianp Exp $ */
 | 
			
		||||
/* $Id: gloss.c,v 1.6 2000/12/24 22:53:54 pesco Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Specular reflection demo.  The specular highlight is modulated by
 | 
			
		||||
@@ -24,7 +24,7 @@
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
 | 
			
		||||
#include "../util/readtex.c"   /* I know, this is a hack. */
 | 
			
		||||
#include "readtex.c"   /* I know, this is a hack. */
 | 
			
		||||
 | 
			
		||||
#define SPECULAR_TEXTURE_FILE "../images/reflect.rgb"
 | 
			
		||||
#define BASE_TEXTURE_FILE "../images/tile.rgb"
 | 
			
		||||
@@ -46,7 +46,7 @@ static GLfloat DXrot = 1.0, DYrot = 2.5;
 | 
			
		||||
static GLfloat Black[4] = { 0, 0, 0, 0 };
 | 
			
		||||
static GLfloat White[4] = { 1, 1, 1, 1 };
 | 
			
		||||
static GLfloat Diffuse[4] = { .3, .3, 1.0, 1.0 };  /* blue */
 | 
			
		||||
static GLfloat Shininess = 15;
 | 
			
		||||
static GLfloat Shininess = 6;
 | 
			
		||||
 | 
			
		||||
static GLuint BaseTexture, SpecularTexture;
 | 
			
		||||
static GLboolean DoSpecTexture = GL_TRUE;
 | 
			
		||||
@@ -245,7 +245,7 @@ static void Init( int argc, char *argv[] )
 | 
			
		||||
 | 
			
		||||
      glMatrixMode(GL_TEXTURE);
 | 
			
		||||
      glLoadIdentity();
 | 
			
		||||
      glScalef(8.0, 4.0, 2.0);
 | 
			
		||||
      /*glScalef(8.0, 4.0, 2.0);*/
 | 
			
		||||
      glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
 | 
			
		||||
      /* cylinder */
 | 
			
		||||
@@ -322,8 +322,14 @@ static void Init( int argc, char *argv[] )
 | 
			
		||||
   glBindTexture(GL_TEXTURE_2D, SpecularTexture);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 | 
			
		||||
#if 1
 | 
			
		||||
   glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
 | 
			
		||||
   glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
 | 
			
		||||
#else
 | 
			
		||||
   glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP_NV);
 | 
			
		||||
   glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP_NV);
 | 
			
		||||
   glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP_NV);
 | 
			
		||||
#endif
 | 
			
		||||
   if (!LoadRGBMipmaps(SPECULAR_TEXTURE_FILE, GL_RGB)) {
 | 
			
		||||
      printf("Error: couldn't load texture image file %s\n", SPECULAR_TEXTURE_FILE);
 | 
			
		||||
      exit(1);
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										580
									
								
								progs/demos/gltestperf.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										580
									
								
								progs/demos/gltestperf.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,580 @@
 | 
			
		||||
/*
 | 
			
		||||
 * This program is under the GNU GPL.
 | 
			
		||||
 * Use at your own risk.
 | 
			
		||||
 *
 | 
			
		||||
 * written by David Bucciarelli (tech.hmw@plus.it)
 | 
			
		||||
 *            Humanware s.r.l.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
 | 
			
		||||
typedef struct
 | 
			
		||||
{
 | 
			
		||||
   char *name;
 | 
			
		||||
   char *unit;
 | 
			
		||||
   void (*init) (void);
 | 
			
		||||
   int (*run) (int, int);
 | 
			
		||||
   int type;
 | 
			
		||||
   int numsize;
 | 
			
		||||
   int size[10];
 | 
			
		||||
}
 | 
			
		||||
benchmark;
 | 
			
		||||
 | 
			
		||||
static int frontbuffer = 1;
 | 
			
		||||
 | 
			
		||||
/***************************************************************************/
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
init_test01(void)
 | 
			
		||||
{
 | 
			
		||||
   glMatrixMode(GL_PROJECTION);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   gluOrtho2D(-0.5, 639.5, -0.5, 479.5);
 | 
			
		||||
   glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
 | 
			
		||||
   glShadeModel(GL_FLAT);
 | 
			
		||||
   glDisable(GL_DEPTH_TEST);
 | 
			
		||||
 | 
			
		||||
   glClearColor(0.0, 0.1, 1.0, 0.0);
 | 
			
		||||
   glClear(GL_COLOR_BUFFER_BIT);
 | 
			
		||||
   glColor3f(1.0, 0.0, 0.0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int
 | 
			
		||||
test01(int size, int num)
 | 
			
		||||
{
 | 
			
		||||
   int x, y;
 | 
			
		||||
 | 
			
		||||
   glBegin(GL_POINTS);
 | 
			
		||||
   for (y = 0; y < num; y++)
 | 
			
		||||
      for (x = 0; x < 480; x++)
 | 
			
		||||
	 glVertex2i(x, x);
 | 
			
		||||
   glEnd();
 | 
			
		||||
 | 
			
		||||
   return 480 * num;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/***************************************************************************/
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
init_test02(void)
 | 
			
		||||
{
 | 
			
		||||
   glMatrixMode(GL_PROJECTION);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   gluOrtho2D(-0.5, 639.5, -0.5, 479.5);
 | 
			
		||||
   glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
 | 
			
		||||
   glShadeModel(GL_SMOOTH);
 | 
			
		||||
   glDisable(GL_DEPTH_TEST);
 | 
			
		||||
 | 
			
		||||
   glClearColor(0.0, 0.1, 1.0, 0.0);
 | 
			
		||||
   glClear(GL_COLOR_BUFFER_BIT);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int
 | 
			
		||||
test02(int size, int num)
 | 
			
		||||
{
 | 
			
		||||
   int x, y;
 | 
			
		||||
 | 
			
		||||
   glBegin(GL_LINES);
 | 
			
		||||
   for (y = 0; y < num; y++)
 | 
			
		||||
      for (x = 0; x < size; x++) {
 | 
			
		||||
	 glColor3f(0.0, 1.0, y / (float) num);
 | 
			
		||||
	 glVertex2i(0, size - 1);
 | 
			
		||||
	 glColor3f(1.0, 0.0, x / (float) size);
 | 
			
		||||
	 glVertex2i(x, x);
 | 
			
		||||
      }
 | 
			
		||||
   glEnd();
 | 
			
		||||
 | 
			
		||||
   return num * size;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/***************************************************************************/
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
init_test03(void)
 | 
			
		||||
{
 | 
			
		||||
   glMatrixMode(GL_PROJECTION);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glOrtho(-0.5, 639.5, -0.5, 479.5, 1.0, -1000.0 * 480.0);
 | 
			
		||||
   glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
 | 
			
		||||
   glShadeModel(GL_SMOOTH);
 | 
			
		||||
   glEnable(GL_DEPTH_TEST);
 | 
			
		||||
 | 
			
		||||
   glClearColor(0.0, 0.1, 1.0, 0.0);
 | 
			
		||||
   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int
 | 
			
		||||
test03(int size, int num)
 | 
			
		||||
{
 | 
			
		||||
   int x, y, z;
 | 
			
		||||
 | 
			
		||||
   glBegin(GL_TRIANGLES);
 | 
			
		||||
   for (y = 0; y < num; y++)
 | 
			
		||||
      for (x = 0; x < size; x += 5) {
 | 
			
		||||
	 z = num * size - (y * size + x);
 | 
			
		||||
	 glColor3f(0.0, 1.0, 0.0);
 | 
			
		||||
	 glVertex3i(0, x, z);
 | 
			
		||||
 | 
			
		||||
	 glColor3f(1.0, 0.0, x / (float) size);
 | 
			
		||||
	 glVertex3i(size - 1 - x, 0, z);
 | 
			
		||||
 | 
			
		||||
	 glColor3f(1.0, x / (float) size, 0.0);
 | 
			
		||||
	 glVertex3i(x, size - 1 - x, z);
 | 
			
		||||
      }
 | 
			
		||||
   glEnd();
 | 
			
		||||
 | 
			
		||||
   return size * num / 5;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/***************************************************************************/
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
init_test04(void)
 | 
			
		||||
{
 | 
			
		||||
   int x, y;
 | 
			
		||||
   GLubyte tex[128 * 128 * 3];
 | 
			
		||||
   GLenum gluerr;
 | 
			
		||||
 | 
			
		||||
   glMatrixMode(GL_PROJECTION);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glOrtho(-0.5, 639.5, -0.5, 479.5, 1.0, -1000.0 * 480.0);
 | 
			
		||||
 | 
			
		||||
   glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
 | 
			
		||||
   glShadeModel(GL_SMOOTH);
 | 
			
		||||
   glEnable(GL_DEPTH_TEST);
 | 
			
		||||
 | 
			
		||||
   glEnable(GL_BLEND);
 | 
			
		||||
   glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 | 
			
		||||
 | 
			
		||||
   for (y = 0; y < 128; y++)
 | 
			
		||||
      for (x = 0; x < 128; x++) {
 | 
			
		||||
	 tex[(x + y * 128) * 3 + 0] = ((x % (128 / 4)) < (128 / 8)) ? 255 : 0;
 | 
			
		||||
	 tex[(x + y * 128) * 3 + 1] = ((y % (128 / 4)) < (128 / 8)) ? 255 : 0;
 | 
			
		||||
	 tex[(x + y * 128) * 3 + 2] = x;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
   glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
 | 
			
		||||
   if ((gluerr = gluBuild2DMipmaps(GL_TEXTURE_2D, 3, 128, 128, GL_RGB,
 | 
			
		||||
				   GL_UNSIGNED_BYTE, (GLvoid *) (&tex[0])))) {
 | 
			
		||||
      fprintf(stderr, "GLULib%s\n", gluErrorString(gluerr));
 | 
			
		||||
      exit(-1);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
 | 
			
		||||
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
 | 
			
		||||
		   GL_LINEAR_MIPMAP_NEAREST);
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 | 
			
		||||
 | 
			
		||||
   glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
 | 
			
		||||
   glEnable(GL_TEXTURE_2D);
 | 
			
		||||
 | 
			
		||||
   glClearColor(0.0, 0.1, 1.0, 0.0);
 | 
			
		||||
   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int
 | 
			
		||||
test04(int size, int num)
 | 
			
		||||
{
 | 
			
		||||
   int x, y, z;
 | 
			
		||||
 | 
			
		||||
   glBegin(GL_TRIANGLES);
 | 
			
		||||
   for (y = 0; y < num; y++)
 | 
			
		||||
      for (x = 0; x < size; x += 5) {
 | 
			
		||||
	 z = num * size - (y * size + x);
 | 
			
		||||
	 glTexCoord2f(1.0, 1.0);
 | 
			
		||||
	 glColor3f(1.0, 0.0, 0.0);
 | 
			
		||||
	 glVertex3i(0, x, z);
 | 
			
		||||
 | 
			
		||||
	 glTexCoord2f(0.0, 1.0);
 | 
			
		||||
	 glColor3f(0.0, 1.0, 0.0);
 | 
			
		||||
	 glVertex3i(size - 1 - x, 0, z);
 | 
			
		||||
 | 
			
		||||
	 glTexCoord2f(1.0, 0.0);
 | 
			
		||||
	 glColor3f(0.0, 0.0, 1.0);
 | 
			
		||||
	 glVertex3i(x, size - 1 - x, z);
 | 
			
		||||
      }
 | 
			
		||||
   glEnd();
 | 
			
		||||
 | 
			
		||||
   return num * size / 5;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/***************************************************************************/
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
init_test05(void)
 | 
			
		||||
{
 | 
			
		||||
   int x, y;
 | 
			
		||||
   GLubyte tex[128 * 128 * 3];
 | 
			
		||||
   GLenum gluerr;
 | 
			
		||||
 | 
			
		||||
   glMatrixMode(GL_PROJECTION);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glOrtho(-0.5, 639.5, -0.5, 479.5, -1.0, 1.0);
 | 
			
		||||
 | 
			
		||||
   glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
 | 
			
		||||
   glShadeModel(GL_SMOOTH);
 | 
			
		||||
   glEnable(GL_DEPTH_TEST);
 | 
			
		||||
 | 
			
		||||
   glEnable(GL_BLEND);
 | 
			
		||||
   glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 | 
			
		||||
 | 
			
		||||
   for (y = 0; y < 128; y++)
 | 
			
		||||
      for (x = 0; x < 128; x++) {
 | 
			
		||||
	 tex[(x + y * 128) * 3 + 0] = ((x % (128 / 4)) < (128 / 8)) ? 255 : 0;
 | 
			
		||||
	 tex[(x + y * 128) * 3 + 1] = ((y % (128 / 4)) < (128 / 8)) ? 255 : 0;
 | 
			
		||||
	 tex[(x + y * 128) * 3 + 2] = x;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
   glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
 | 
			
		||||
   if ((gluerr = gluBuild2DMipmaps(GL_TEXTURE_2D, 3, 128, 128, GL_RGB,
 | 
			
		||||
				   GL_UNSIGNED_BYTE, (GLvoid *) (&tex[0])))) {
 | 
			
		||||
      fprintf(stderr, "GLULib%s\n", gluErrorString(gluerr));
 | 
			
		||||
      exit(-1);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
 | 
			
		||||
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
 | 
			
		||||
		   GL_LINEAR_MIPMAP_NEAREST);
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 | 
			
		||||
 | 
			
		||||
   glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
 | 
			
		||||
   glEnable(GL_TEXTURE_2D);
 | 
			
		||||
 | 
			
		||||
   glDepthFunc(GL_ALWAYS);
 | 
			
		||||
 | 
			
		||||
   glClearColor(0.0, 0.1, 1.0, 0.0);
 | 
			
		||||
   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int
 | 
			
		||||
test05(int size, int num)
 | 
			
		||||
{
 | 
			
		||||
   int y;
 | 
			
		||||
   float v0[3], v1[3], v2[3], v3[3];
 | 
			
		||||
   float cv0[3], cv1[3], cv2[3], cv3[3];
 | 
			
		||||
   float tv0[3], tv1[3], tv2[3], tv3[3];
 | 
			
		||||
 | 
			
		||||
   v0[0] = 320 - size / 2;
 | 
			
		||||
   v0[1] = 240 - size / 2;
 | 
			
		||||
   v0[2] = 0.0;
 | 
			
		||||
   v1[0] = 320 + size / 2;
 | 
			
		||||
   v1[1] = 240 - size / 2;
 | 
			
		||||
   v1[2] = 0.0;
 | 
			
		||||
   v2[0] = 320 - size / 2;
 | 
			
		||||
   v2[1] = 240 + size / 2;
 | 
			
		||||
   v2[2] = 0.0;
 | 
			
		||||
   v3[0] = 320 + size / 2;
 | 
			
		||||
   v3[1] = 240 + size / 2;
 | 
			
		||||
   v3[2] = 0.0;
 | 
			
		||||
   cv0[0] = 1.0;
 | 
			
		||||
   cv0[1] = 0.0;
 | 
			
		||||
   cv0[2] = 0.0;
 | 
			
		||||
   cv1[0] = 1.0;
 | 
			
		||||
   cv1[1] = 1.0;
 | 
			
		||||
   cv1[2] = 0.0;
 | 
			
		||||
   cv2[0] = 1.0;
 | 
			
		||||
   cv2[1] = 0.0;
 | 
			
		||||
   cv2[2] = 1.0;
 | 
			
		||||
   cv3[0] = 1.0;
 | 
			
		||||
   cv3[1] = 1.0;
 | 
			
		||||
   cv3[2] = 1.0;
 | 
			
		||||
   tv0[0] = 0.0;
 | 
			
		||||
   tv0[1] = 0.0;
 | 
			
		||||
   tv0[2] = 0.0;
 | 
			
		||||
   tv1[0] = 1.0;
 | 
			
		||||
   tv1[1] = 0.0;
 | 
			
		||||
   tv1[2] = 0.0;
 | 
			
		||||
   tv2[0] = 0.0;
 | 
			
		||||
   tv2[1] = 1.0;
 | 
			
		||||
   tv2[2] = 0.0;
 | 
			
		||||
   tv3[0] = 1.0;
 | 
			
		||||
   tv3[1] = 1.0;
 | 
			
		||||
   tv3[2] = 0.0;
 | 
			
		||||
 | 
			
		||||
   glBegin(GL_TRIANGLE_STRIP);
 | 
			
		||||
   for (y = 0; y < num; y++) {
 | 
			
		||||
      glColor3fv(cv0);
 | 
			
		||||
      glTexCoord2fv(tv0);
 | 
			
		||||
      glVertex3fv(v0);
 | 
			
		||||
 | 
			
		||||
      glColor3fv(cv1);
 | 
			
		||||
      glTexCoord2fv(tv1);
 | 
			
		||||
      glVertex3fv(v1);
 | 
			
		||||
 | 
			
		||||
      glColor3fv(cv2);
 | 
			
		||||
      glTexCoord2fv(tv2);
 | 
			
		||||
      glVertex3fv(v2);
 | 
			
		||||
 | 
			
		||||
      glColor3fv(cv3);
 | 
			
		||||
      glTexCoord2fv(tv3);
 | 
			
		||||
      glVertex3fv(v3);
 | 
			
		||||
   }
 | 
			
		||||
   glEnd();
 | 
			
		||||
 | 
			
		||||
   return 4 * num - 2;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/***************************************************************************/
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
init_test06(void)
 | 
			
		||||
{
 | 
			
		||||
   glMatrixMode(GL_PROJECTION);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   gluOrtho2D(-0.5, 639.5, -0.5, 479.5);
 | 
			
		||||
   glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
 | 
			
		||||
   glShadeModel(GL_SMOOTH);
 | 
			
		||||
   glEnable(GL_DEPTH_TEST);
 | 
			
		||||
 | 
			
		||||
   glClearColor(0.0, 0.1, 1.0, 0.0);
 | 
			
		||||
   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int
 | 
			
		||||
test06(int size, int num)
 | 
			
		||||
{
 | 
			
		||||
   int y;
 | 
			
		||||
 | 
			
		||||
   for (y = 0; y < num; y++) {
 | 
			
		||||
      glClearColor(y / (float) num, 0.1, 1.0, 0.0);
 | 
			
		||||
      glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   return num;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/***************************************************************************/
 | 
			
		||||
 | 
			
		||||
#define BMARKS_TIME 5.0
 | 
			
		||||
 | 
			
		||||
#define NUM_BMARKS 6
 | 
			
		||||
 | 
			
		||||
/* 554 ~= sqrt(640*480) */
 | 
			
		||||
 | 
			
		||||
static benchmark bmarks[NUM_BMARKS] = {
 | 
			
		||||
   {"Simple Points", "Pnts", init_test01, test01, 0, 0,
 | 
			
		||||
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
 | 
			
		||||
   {"Smooth Lines", "Lins", init_test02, test02, 1, 5,
 | 
			
		||||
    {480, 250, 100, 50, 25, 0, 0, 0, 0, 0}},
 | 
			
		||||
   {"ZSmooth Triangles", "Tris", init_test03, test03, 1, 5,
 | 
			
		||||
    {480, 250, 100, 50, 25, 0, 0, 0, 0, 0}},
 | 
			
		||||
   {"ZSmooth Tex Blend Triangles", "Tris", init_test04, test04, 1, 5,
 | 
			
		||||
    {480, 250, 100, 50, 25, 0, 0, 0, 0, 0}},
 | 
			
		||||
   {"ZSmooth Tex Blend TMesh Triangles", "Tris", init_test05, test05, 2, 8,
 | 
			
		||||
    {400, 250, 100, 50, 25, 10, 5, 2, 0, 0}},
 | 
			
		||||
   {"Color/Depth Buffer Clears", "Clrs", init_test06, test06, 3, 0,
 | 
			
		||||
    {554, 0, 0, 0, 0, 0, 0, 0, 0, 0}}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/***************************************************************************/
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
dotest0param(benchmark * bmark)
 | 
			
		||||
{
 | 
			
		||||
   float stime, etime, dtime, tottime, maxtime, mintime;
 | 
			
		||||
   int num, numelem, calibnum, j;
 | 
			
		||||
 | 
			
		||||
   glPushAttrib(GL_ALL_ATTRIB_BITS);
 | 
			
		||||
   bmark->init();
 | 
			
		||||
 | 
			
		||||
   stime = glutGet(GLUT_ELAPSED_TIME);
 | 
			
		||||
 | 
			
		||||
   dtime = 0.0;
 | 
			
		||||
   calibnum = 0;
 | 
			
		||||
   while (dtime < 2.0) {
 | 
			
		||||
      bmark->run(0, 1);
 | 
			
		||||
      glFinish();
 | 
			
		||||
      etime = glutGet(GLUT_ELAPSED_TIME);
 | 
			
		||||
      dtime = (etime - stime) / 1000.0;
 | 
			
		||||
      calibnum++;
 | 
			
		||||
   }
 | 
			
		||||
   glPopAttrib();
 | 
			
		||||
 | 
			
		||||
   fprintf(stderr, "Elapsed time for the calibration test (%d): %f\n",
 | 
			
		||||
	   calibnum, dtime);
 | 
			
		||||
 | 
			
		||||
   num = (int) ((BMARKS_TIME / dtime) * calibnum);
 | 
			
		||||
 | 
			
		||||
   if (num < 1)
 | 
			
		||||
      num = 1;
 | 
			
		||||
 | 
			
		||||
   fprintf(stderr, "Selected number of benchmark iterations: %d\n", num);
 | 
			
		||||
 | 
			
		||||
   mintime = HUGE_VAL;
 | 
			
		||||
   maxtime = -HUGE_VAL;
 | 
			
		||||
 | 
			
		||||
   for (tottime = 0.0, j = 0; j < 5; j++) {
 | 
			
		||||
      glPushAttrib(GL_ALL_ATTRIB_BITS);
 | 
			
		||||
      bmark->init();
 | 
			
		||||
 | 
			
		||||
      stime = glutGet(GLUT_ELAPSED_TIME);
 | 
			
		||||
      numelem = bmark->run(0, num);
 | 
			
		||||
      glFinish();
 | 
			
		||||
      etime = glutGet(GLUT_ELAPSED_TIME);
 | 
			
		||||
 | 
			
		||||
      glPopAttrib();
 | 
			
		||||
 | 
			
		||||
      dtime = (etime - stime) / 1000.0;
 | 
			
		||||
      tottime += dtime;
 | 
			
		||||
 | 
			
		||||
      fprintf(stderr, "Elapsed time for run %d: %f\n", j, dtime);
 | 
			
		||||
 | 
			
		||||
      if (dtime < mintime)
 | 
			
		||||
	 mintime = dtime;
 | 
			
		||||
      if (dtime > maxtime)
 | 
			
		||||
	 maxtime = dtime;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   tottime -= mintime + maxtime;
 | 
			
		||||
 | 
			
		||||
   fprintf(stdout, "%s\n%f %s/sec", bmark->name, numelem / (tottime / 3.0),
 | 
			
		||||
	   bmark->unit);
 | 
			
		||||
 | 
			
		||||
   if (bmark->type == 3)
 | 
			
		||||
      fprintf(stdout, ", MPixel Fill/sec: %f\n\n",
 | 
			
		||||
	      (numelem * bmark->size[0] * (float) bmark->size[0]) /
 | 
			
		||||
	      (1000000.0 * tottime / 3.0));
 | 
			
		||||
   else
 | 
			
		||||
      fprintf(stdout, "\n\n");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/***************************************************************************/
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
dotest1param(benchmark * bmark)
 | 
			
		||||
{
 | 
			
		||||
   float stime, etime, dtime, tottime, maxtime, mintime;
 | 
			
		||||
   int num, numelem, calibnum, j, k;
 | 
			
		||||
 | 
			
		||||
   fprintf(stdout, "%s\n", bmark->name);
 | 
			
		||||
 | 
			
		||||
   for (j = 0; j < bmark->numsize; j++) {
 | 
			
		||||
      fprintf(stderr, "Current size: %d\n", bmark->size[j]);
 | 
			
		||||
 | 
			
		||||
      glPushAttrib(GL_ALL_ATTRIB_BITS);
 | 
			
		||||
      bmark->init();
 | 
			
		||||
 | 
			
		||||
      stime = glutGet(GLUT_ELAPSED_TIME);
 | 
			
		||||
 | 
			
		||||
      dtime = 0.0;
 | 
			
		||||
      calibnum = 0;
 | 
			
		||||
      while (dtime < 2.0) {
 | 
			
		||||
	 bmark->run(bmark->size[j], 1);
 | 
			
		||||
	 glFinish();
 | 
			
		||||
	 etime = glutGet(GLUT_ELAPSED_TIME);
 | 
			
		||||
	 dtime = (etime - stime) / 1000.0;
 | 
			
		||||
	 calibnum++;
 | 
			
		||||
      }
 | 
			
		||||
      glPopAttrib();
 | 
			
		||||
 | 
			
		||||
      fprintf(stderr, "Elapsed time for the calibration test (%d): %f\n",
 | 
			
		||||
	      calibnum, dtime);
 | 
			
		||||
 | 
			
		||||
      num = (int) ((BMARKS_TIME / dtime) * calibnum);
 | 
			
		||||
 | 
			
		||||
      if (num < 1)
 | 
			
		||||
	 num = 1;
 | 
			
		||||
 | 
			
		||||
      fprintf(stderr, "Selected number of benchmark iterations: %d\n", num);
 | 
			
		||||
 | 
			
		||||
      mintime = HUGE_VAL;
 | 
			
		||||
      maxtime = -HUGE_VAL;
 | 
			
		||||
 | 
			
		||||
      for (numelem = 1, tottime = 0.0, k = 0; k < 5; k++) {
 | 
			
		||||
	 glPushAttrib(GL_ALL_ATTRIB_BITS);
 | 
			
		||||
	 bmark->init();
 | 
			
		||||
 | 
			
		||||
	 stime = glutGet(GLUT_ELAPSED_TIME);
 | 
			
		||||
	 numelem = bmark->run(bmark->size[j], num);
 | 
			
		||||
	 glFinish();
 | 
			
		||||
	 etime = glutGet(GLUT_ELAPSED_TIME);
 | 
			
		||||
 | 
			
		||||
	 glPopAttrib();
 | 
			
		||||
 | 
			
		||||
	 dtime = (etime - stime) / 1000.0;
 | 
			
		||||
	 tottime += dtime;
 | 
			
		||||
 | 
			
		||||
	 fprintf(stderr, "Elapsed time for run %d: %f\n", k, dtime);
 | 
			
		||||
 | 
			
		||||
	 if (dtime < mintime)
 | 
			
		||||
	    mintime = dtime;
 | 
			
		||||
	 if (dtime > maxtime)
 | 
			
		||||
	    maxtime = dtime;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      tottime -= mintime + maxtime;
 | 
			
		||||
 | 
			
		||||
      fprintf(stdout, "SIZE=%03d => %f %s/sec", bmark->size[j],
 | 
			
		||||
	      numelem / (tottime / 3.0), bmark->unit);
 | 
			
		||||
      if (bmark->type == 2)
 | 
			
		||||
	 fprintf(stdout, ", MPixel Fill/sec: %f\n",
 | 
			
		||||
		 (numelem * bmark->size[j] * bmark->size[j] / 2) /
 | 
			
		||||
		 (1000000.0 * tottime / 3.0));
 | 
			
		||||
      else
 | 
			
		||||
	 fprintf(stdout, "\n");
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   fprintf(stdout, "\n\n");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/***************************************************************************/
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
display(void)
 | 
			
		||||
{
 | 
			
		||||
   int i;
 | 
			
		||||
 | 
			
		||||
   if (frontbuffer)
 | 
			
		||||
      glDrawBuffer(GL_FRONT);
 | 
			
		||||
   else
 | 
			
		||||
      glDrawBuffer(GL_BACK);
 | 
			
		||||
 | 
			
		||||
   for (i = 0; i < NUM_BMARKS; i++) {
 | 
			
		||||
      fprintf(stderr, "Benchmark: %d\n", i);
 | 
			
		||||
 | 
			
		||||
      switch (bmarks[i].type) {
 | 
			
		||||
      case 0:
 | 
			
		||||
      case 3:
 | 
			
		||||
	 dotest0param(&bmarks[i]);
 | 
			
		||||
	 break;
 | 
			
		||||
      case 1:
 | 
			
		||||
      case 2:
 | 
			
		||||
	 dotest1param(&bmarks[i]);
 | 
			
		||||
	 break;
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   exit(0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int
 | 
			
		||||
main(int ac, char **av)
 | 
			
		||||
{
 | 
			
		||||
   fprintf(stderr, "GLTest v1.0\nWritten by David Bucciarelli\n");
 | 
			
		||||
 | 
			
		||||
   if (ac == 2)
 | 
			
		||||
      frontbuffer = 0;
 | 
			
		||||
 | 
			
		||||
   glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
 | 
			
		||||
   glutInitWindowPosition(0, 0);
 | 
			
		||||
   glutInitWindowSize(640, 480);
 | 
			
		||||
   glutCreateWindow("OpenGL/Mesa Performances");
 | 
			
		||||
   glutDisplayFunc(display);
 | 
			
		||||
   glutMainLoop();
 | 
			
		||||
 | 
			
		||||
   return 0;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: glutfx.c,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
 | 
			
		||||
/* $Id: glutfx.c,v 1.2 2000/06/27 17:04:43 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Example of how one might use GLUT with the 3Dfx driver in full-screen mode.
 | 
			
		||||
@@ -16,8 +16,11 @@
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: glutfx.c,v $
 | 
			
		||||
 * Revision 1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Initial revision
 | 
			
		||||
 * Revision 1.2  2000/06/27 17:04:43  brianp
 | 
			
		||||
 * fixed compiler warnings
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.1.1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Imported sources
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.2  1999/03/28 18:18:33  brianp
 | 
			
		||||
 * minor clean-up
 | 
			
		||||
@@ -164,7 +167,6 @@ int main( int argc, char *argv[] )
 | 
			
		||||
   printf("NOTE: if you've got 3Dfx VooDoo hardware you must run this");
 | 
			
		||||
   printf(" program as root.\n\n");
 | 
			
		||||
   printf("Move the mouse.  Press ESC to exit.\n\n");
 | 
			
		||||
   sleep(2);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* Tell Mesa GLX to use 3Dfx driver in fullscreen mode. */
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										706
									
								
								progs/demos/ipers.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										706
									
								
								progs/demos/ipers.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,706 @@
 | 
			
		||||
/*
 | 
			
		||||
 * This program is under the GNU GPL.
 | 
			
		||||
 * Use at your own risk.
 | 
			
		||||
 *
 | 
			
		||||
 * written by David Bucciarelli (tech.hmw@plus.it)
 | 
			
		||||
 *            Humanware s.r.l.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <time.h>
 | 
			
		||||
 | 
			
		||||
#if defined (WIN32)|| defined(_WIN32)
 | 
			
		||||
#include <windows.h>
 | 
			
		||||
#include <mmsystem.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
 | 
			
		||||
#include "readtex.c"
 | 
			
		||||
 | 
			
		||||
#ifdef XMESA
 | 
			
		||||
#include "GL/xmesa.h"
 | 
			
		||||
static int fullscreen = 1;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
static int WIDTH = 640;
 | 
			
		||||
static int HEIGHT = 480;
 | 
			
		||||
 | 
			
		||||
static GLint T0;
 | 
			
		||||
static GLint Frames;
 | 
			
		||||
 | 
			
		||||
#define MAX_LOD 9
 | 
			
		||||
 | 
			
		||||
#define TEX_SKY_WIDTH 256
 | 
			
		||||
#define TEX_SKY_HEIGHT TEX_SKY_WIDTH
 | 
			
		||||
 | 
			
		||||
#ifndef M_PI
 | 
			
		||||
#define M_PI 3.1415926535
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define FROM_NONE   0
 | 
			
		||||
#define FROM_DOWN   1
 | 
			
		||||
#define FROM_UP     2
 | 
			
		||||
#define FROM_LEFT   3
 | 
			
		||||
#define FROM_RIGHT  4
 | 
			
		||||
#define FROM_FRONT  5
 | 
			
		||||
#define FROM_BACK   6
 | 
			
		||||
 | 
			
		||||
static int win = 0;
 | 
			
		||||
 | 
			
		||||
static float obs[3] = { 3.8, 0.0, 0.0 };
 | 
			
		||||
static float dir[3];
 | 
			
		||||
static float v = 0.0;
 | 
			
		||||
static float alpha = -90.0;
 | 
			
		||||
static float beta = 90.0;
 | 
			
		||||
 | 
			
		||||
static int fog = 1;
 | 
			
		||||
static int bfcull = 1;
 | 
			
		||||
static int usetex = 1;
 | 
			
		||||
static int help = 1;
 | 
			
		||||
static int poutline = 0;
 | 
			
		||||
static int normext = 1;
 | 
			
		||||
static int joyavailable = 0;
 | 
			
		||||
static int joyactive = 0;
 | 
			
		||||
static int LODbias = 3;
 | 
			
		||||
static int maxdepth = MAX_LOD;
 | 
			
		||||
 | 
			
		||||
static unsigned int totpoly = 0;
 | 
			
		||||
 | 
			
		||||
static GLuint t1id, t2id;
 | 
			
		||||
static GLuint skydlist, LODdlist[MAX_LOD], LODnumpoly[MAX_LOD];
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
initlight(void)
 | 
			
		||||
{
 | 
			
		||||
   GLfloat lspec[4] = { 1.0, 1.0, 1.0, 1.0 };
 | 
			
		||||
   static GLfloat lightpos[4] = { 30, 15.0, 30.0, 1.0 };
 | 
			
		||||
 | 
			
		||||
   glLightfv(GL_LIGHT0, GL_POSITION, lightpos);
 | 
			
		||||
   glLightfv(GL_LIGHT0, GL_SPECULAR, lspec);
 | 
			
		||||
 | 
			
		||||
   glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 32.0);
 | 
			
		||||
   glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, lspec);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
initdlists(void)
 | 
			
		||||
{
 | 
			
		||||
   static int slicetable[MAX_LOD][2] = {
 | 
			
		||||
      {21, 10},
 | 
			
		||||
      {18, 9},
 | 
			
		||||
      {15, 8},
 | 
			
		||||
      {12, 7},
 | 
			
		||||
      {9, 6},
 | 
			
		||||
      {7, 5},
 | 
			
		||||
      {5, 4},
 | 
			
		||||
      {4, 3},
 | 
			
		||||
      {3, 2}
 | 
			
		||||
   };
 | 
			
		||||
   GLUquadricObj *obj;
 | 
			
		||||
   int i, xslices, yslices;
 | 
			
		||||
 | 
			
		||||
   obj = gluNewQuadric();
 | 
			
		||||
 | 
			
		||||
   skydlist = glGenLists(1);
 | 
			
		||||
   glNewList(skydlist, GL_COMPILE);
 | 
			
		||||
   glBindTexture(GL_TEXTURE_2D, t2id);
 | 
			
		||||
   glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
 | 
			
		||||
   glColor3f(1.0f, 1.0f, 1.0f);
 | 
			
		||||
 | 
			
		||||
   gluQuadricDrawStyle(obj, GLU_FILL);
 | 
			
		||||
   gluQuadricNormals(obj, GLU_NONE);
 | 
			
		||||
   gluQuadricTexture(obj, GL_TRUE);
 | 
			
		||||
   gluQuadricOrientation(obj, GLU_INSIDE);
 | 
			
		||||
   gluSphere(obj, 40.0f, 18, 9);
 | 
			
		||||
 | 
			
		||||
   glEndList();
 | 
			
		||||
 | 
			
		||||
   for (i = 0; i < MAX_LOD; i++) {
 | 
			
		||||
      LODdlist[i] = glGenLists(1);
 | 
			
		||||
      glNewList(LODdlist[i], GL_COMPILE);
 | 
			
		||||
 | 
			
		||||
      gluQuadricDrawStyle(obj, GLU_FILL);
 | 
			
		||||
      gluQuadricNormals(obj, GLU_SMOOTH);
 | 
			
		||||
      gluQuadricTexture(obj, GL_TRUE);
 | 
			
		||||
      gluQuadricOrientation(obj, GLU_OUTSIDE);
 | 
			
		||||
      xslices = slicetable[i][0];
 | 
			
		||||
      yslices = slicetable[i][1];
 | 
			
		||||
      gluSphere(obj, 1.0f, xslices, yslices);
 | 
			
		||||
      LODnumpoly[i] = xslices * (yslices - 2) + 2 * (xslices - 1);
 | 
			
		||||
 | 
			
		||||
      glEndList();
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
inittextures(void)
 | 
			
		||||
{
 | 
			
		||||
   GLubyte tsky[TEX_SKY_HEIGHT][TEX_SKY_WIDTH][3];
 | 
			
		||||
   GLuint x, y;
 | 
			
		||||
   GLfloat fact;
 | 
			
		||||
   GLenum gluerr;
 | 
			
		||||
 | 
			
		||||
   /* Brick */
 | 
			
		||||
 | 
			
		||||
   glGenTextures(1, &t1id);
 | 
			
		||||
   glBindTexture(GL_TEXTURE_2D, t1id);
 | 
			
		||||
 | 
			
		||||
   if (!LoadRGBMipmaps("../images/bw.rgb", 3)) {
 | 
			
		||||
      fprintf(stderr, "Error reading a texture.\n");
 | 
			
		||||
      exit(-1);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
 | 
			
		||||
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
 | 
			
		||||
		   GL_LINEAR_MIPMAP_LINEAR);
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 | 
			
		||||
 | 
			
		||||
   /* Sky */
 | 
			
		||||
 | 
			
		||||
   glGenTextures(1, &t2id);
 | 
			
		||||
   glBindTexture(GL_TEXTURE_2D, t2id);
 | 
			
		||||
 | 
			
		||||
   for (y = 0; y < TEX_SKY_HEIGHT; y++)
 | 
			
		||||
      for (x = 0; x < TEX_SKY_WIDTH; x++)
 | 
			
		||||
	 if (y < TEX_SKY_HEIGHT / 2) {
 | 
			
		||||
	    fact = y / (GLfloat) (TEX_SKY_HEIGHT / 2);
 | 
			
		||||
	    tsky[y][x][0] =
 | 
			
		||||
	       (GLubyte) (255.0f * (0.1f * fact + 0.3f * (1.0f - fact)));
 | 
			
		||||
	    tsky[y][x][1] =
 | 
			
		||||
	       (GLubyte) (255.0f * (0.2f * fact + 1.0f * (1.0f - fact)));
 | 
			
		||||
	    tsky[y][x][2] = 255;
 | 
			
		||||
	 }
 | 
			
		||||
	 else {
 | 
			
		||||
	    tsky[y][x][0] = tsky[TEX_SKY_HEIGHT - y - 1][x][0];
 | 
			
		||||
	    tsky[y][x][1] = tsky[TEX_SKY_HEIGHT - y - 1][x][1];
 | 
			
		||||
	    tsky[y][x][2] = 255;
 | 
			
		||||
	 }
 | 
			
		||||
 | 
			
		||||
   glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
 | 
			
		||||
   if (
 | 
			
		||||
       (gluerr =
 | 
			
		||||
	gluBuild2DMipmaps(GL_TEXTURE_2D, 3, TEX_SKY_WIDTH, TEX_SKY_HEIGHT,
 | 
			
		||||
			  GL_RGB, GL_UNSIGNED_BYTE, (GLvoid *) (tsky)))) {
 | 
			
		||||
      fprintf(stderr, "GLULib%s\n", gluErrorString(gluerr));
 | 
			
		||||
      exit(-1);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
 | 
			
		||||
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
 | 
			
		||||
		   GL_LINEAR_MIPMAP_LINEAR);
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
calcposobs(void)
 | 
			
		||||
{
 | 
			
		||||
   dir[0] = sin(alpha * M_PI / 180.0);
 | 
			
		||||
   dir[1] = cos(alpha * M_PI / 180.0) * sin(beta * M_PI / 180.0);
 | 
			
		||||
   dir[2] = cos(beta * M_PI / 180.0);
 | 
			
		||||
 | 
			
		||||
   if (dir[0] < 1.0e-5 && dir[0] > -1.0e-5)
 | 
			
		||||
      dir[0] = 0;
 | 
			
		||||
   if (dir[1] < 1.0e-5 && dir[1] > -1.0e-5)
 | 
			
		||||
      dir[1] = 0;
 | 
			
		||||
   if (dir[2] < 1.0e-5 && dir[2] > -1.0e-5)
 | 
			
		||||
      dir[2] = 0;
 | 
			
		||||
 | 
			
		||||
   obs[0] += v * dir[0];
 | 
			
		||||
   obs[1] += v * dir[1];
 | 
			
		||||
   obs[2] += v * dir[2];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
special(int k, int x, int y)
 | 
			
		||||
{
 | 
			
		||||
   switch (k) {
 | 
			
		||||
   case GLUT_KEY_LEFT:
 | 
			
		||||
      alpha -= 2.0;
 | 
			
		||||
      break;
 | 
			
		||||
   case GLUT_KEY_RIGHT:
 | 
			
		||||
      alpha += 2.0;
 | 
			
		||||
      break;
 | 
			
		||||
   case GLUT_KEY_DOWN:
 | 
			
		||||
      beta -= 2.0;
 | 
			
		||||
      break;
 | 
			
		||||
   case GLUT_KEY_UP:
 | 
			
		||||
      beta += 2.0;
 | 
			
		||||
      break;
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
key(unsigned char k, int x, int y)
 | 
			
		||||
{
 | 
			
		||||
   switch (k) {
 | 
			
		||||
   case 27:
 | 
			
		||||
      exit(0);
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
   case 'a':
 | 
			
		||||
      v += 0.01;
 | 
			
		||||
      break;
 | 
			
		||||
   case 'z':
 | 
			
		||||
      v -= 0.01;
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
#ifdef XMESA
 | 
			
		||||
   case ' ':
 | 
			
		||||
      fullscreen = (!fullscreen);
 | 
			
		||||
      XMesaSetFXmode(fullscreen ? XMESA_FX_FULLSCREEN : XMESA_FX_WINDOW);
 | 
			
		||||
      break;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   case '+':
 | 
			
		||||
      LODbias--;
 | 
			
		||||
      break;
 | 
			
		||||
   case '-':
 | 
			
		||||
      LODbias++;
 | 
			
		||||
      break;
 | 
			
		||||
   case 'j':
 | 
			
		||||
      joyactive = (!joyactive);
 | 
			
		||||
      break;
 | 
			
		||||
   case 'h':
 | 
			
		||||
      help = (!help);
 | 
			
		||||
      break;
 | 
			
		||||
   case 'f':
 | 
			
		||||
      fog = (!fog);
 | 
			
		||||
      break;
 | 
			
		||||
   case 't':
 | 
			
		||||
      usetex = (!usetex);
 | 
			
		||||
      break;
 | 
			
		||||
   case 'n':
 | 
			
		||||
      normext = (!normext);
 | 
			
		||||
      break;
 | 
			
		||||
   case 'b':
 | 
			
		||||
      if (bfcull) {
 | 
			
		||||
	 glDisable(GL_CULL_FACE);
 | 
			
		||||
	 bfcull = 0;
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
	 glEnable(GL_CULL_FACE);
 | 
			
		||||
	 bfcull = 1;
 | 
			
		||||
      }
 | 
			
		||||
      break;
 | 
			
		||||
   case 'p':
 | 
			
		||||
      if (poutline) {
 | 
			
		||||
	 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
 | 
			
		||||
	 poutline = 0;
 | 
			
		||||
	 usetex = 1;
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
	 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
 | 
			
		||||
	 poutline = 1;
 | 
			
		||||
	 usetex = 0;
 | 
			
		||||
      }
 | 
			
		||||
      break;
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
reshape(int w, int h)
 | 
			
		||||
{
 | 
			
		||||
   WIDTH = w;
 | 
			
		||||
   HEIGHT = h;
 | 
			
		||||
   glMatrixMode(GL_PROJECTION);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   gluPerspective(90.0, w / (float) h, 0.8, 100.0);
 | 
			
		||||
   glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glViewport(0, 0, w, h);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
printstring(void *font, char *string)
 | 
			
		||||
{
 | 
			
		||||
   int len, i;
 | 
			
		||||
 | 
			
		||||
   len = (int) strlen(string);
 | 
			
		||||
   for (i = 0; i < len; i++)
 | 
			
		||||
      glutBitmapCharacter(font, string[i]);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
printhelp(void)
 | 
			
		||||
{
 | 
			
		||||
   glEnable(GL_BLEND);
 | 
			
		||||
   glColor4f(0.5, 0.5, 0.5, 0.5);
 | 
			
		||||
   glRecti(40, 40, 600, 440);
 | 
			
		||||
   glDisable(GL_BLEND);
 | 
			
		||||
 | 
			
		||||
   glColor3f(1.0, 0.0, 0.0);
 | 
			
		||||
   glRasterPos2i(300, 420);
 | 
			
		||||
   printstring(GLUT_BITMAP_TIMES_ROMAN_24, "Help");
 | 
			
		||||
 | 
			
		||||
   glRasterPos2i(60, 390);
 | 
			
		||||
   printstring(GLUT_BITMAP_TIMES_ROMAN_24, "h - Toggle Help");
 | 
			
		||||
   glRasterPos2i(60, 360);
 | 
			
		||||
   printstring(GLUT_BITMAP_TIMES_ROMAN_24, "t - Toggle Textures");
 | 
			
		||||
   glRasterPos2i(60, 330);
 | 
			
		||||
   printstring(GLUT_BITMAP_TIMES_ROMAN_24, "f - Toggle Fog");
 | 
			
		||||
   glRasterPos2i(60, 300);
 | 
			
		||||
   printstring(GLUT_BITMAP_TIMES_ROMAN_24, "b - Toggle Back face culling");
 | 
			
		||||
   glRasterPos2i(60, 270);
 | 
			
		||||
   printstring(GLUT_BITMAP_TIMES_ROMAN_24, "Arrow Keys - Rotate");
 | 
			
		||||
   glRasterPos2i(60, 240);
 | 
			
		||||
   printstring(GLUT_BITMAP_TIMES_ROMAN_24, "a - Increase velocity");
 | 
			
		||||
   glRasterPos2i(60, 210);
 | 
			
		||||
   printstring(GLUT_BITMAP_TIMES_ROMAN_24, "z - Decrease velocity");
 | 
			
		||||
   glRasterPos2i(60, 180);
 | 
			
		||||
   printstring(GLUT_BITMAP_TIMES_ROMAN_24, "p - Toggle Wire frame");
 | 
			
		||||
   glRasterPos2i(60, 150);
 | 
			
		||||
   printstring(GLUT_BITMAP_TIMES_ROMAN_24,
 | 
			
		||||
	       "b - Toggle GL_EXT_rescale_normal extension");
 | 
			
		||||
   glRasterPos2i(60, 120);
 | 
			
		||||
   printstring(GLUT_BITMAP_TIMES_ROMAN_24,
 | 
			
		||||
	       "+/- - Increase/decrease the Object maximum LOD");
 | 
			
		||||
 | 
			
		||||
   glRasterPos2i(60, 90);
 | 
			
		||||
   if (joyavailable)
 | 
			
		||||
      printstring(GLUT_BITMAP_TIMES_ROMAN_24,
 | 
			
		||||
		  "j - Toggle jostick control (Joystick control available)");
 | 
			
		||||
   else
 | 
			
		||||
      printstring(GLUT_BITMAP_TIMES_ROMAN_24,
 | 
			
		||||
		  "(No Joystick control available)");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
dojoy(void)
 | 
			
		||||
{
 | 
			
		||||
#ifdef _WIN32
 | 
			
		||||
   static UINT max[2] = { 0, 0 };
 | 
			
		||||
   static UINT min[2] = { 0xffffffff, 0xffffffff }, center[2];
 | 
			
		||||
   MMRESULT res;
 | 
			
		||||
   JOYINFO joy;
 | 
			
		||||
 | 
			
		||||
   res = joyGetPos(JOYSTICKID1, &joy);
 | 
			
		||||
 | 
			
		||||
   if (res == JOYERR_NOERROR) {
 | 
			
		||||
      joyavailable = 1;
 | 
			
		||||
 | 
			
		||||
      if (max[0] < joy.wXpos)
 | 
			
		||||
	 max[0] = joy.wXpos;
 | 
			
		||||
      if (min[0] > joy.wXpos)
 | 
			
		||||
	 min[0] = joy.wXpos;
 | 
			
		||||
      center[0] = (max[0] + min[0]) / 2;
 | 
			
		||||
 | 
			
		||||
      if (max[1] < joy.wYpos)
 | 
			
		||||
	 max[1] = joy.wYpos;
 | 
			
		||||
      if (min[1] > joy.wYpos)
 | 
			
		||||
	 min[1] = joy.wYpos;
 | 
			
		||||
      center[1] = (max[1] + min[1]) / 2;
 | 
			
		||||
 | 
			
		||||
      if (joyactive) {
 | 
			
		||||
	 if (fabs(center[0] - (float) joy.wXpos) > 0.1 * (max[0] - min[0]))
 | 
			
		||||
	    alpha -=
 | 
			
		||||
	       2.0 * (center[0] - (float) joy.wXpos) / (max[0] - min[0]);
 | 
			
		||||
	 if (fabs(center[1] - (float) joy.wYpos) > 0.1 * (max[1] - min[1]))
 | 
			
		||||
	    beta += 2.0 * (center[1] - (float) joy.wYpos) / (max[1] - min[1]);
 | 
			
		||||
 | 
			
		||||
	 if (joy.wButtons & JOY_BUTTON1)
 | 
			
		||||
	    v += 0.01;
 | 
			
		||||
	 if (joy.wButtons & JOY_BUTTON2)
 | 
			
		||||
	    v -= 0.01;
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
   else
 | 
			
		||||
      joyavailable = 0;
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
drawipers(int depth, int from)
 | 
			
		||||
{
 | 
			
		||||
   int lod;
 | 
			
		||||
 | 
			
		||||
   if (depth == maxdepth)
 | 
			
		||||
      return;
 | 
			
		||||
 | 
			
		||||
   lod = depth + LODbias;
 | 
			
		||||
   if (lod < 0)
 | 
			
		||||
      lod = 0;
 | 
			
		||||
   if (lod >= MAX_LOD)
 | 
			
		||||
      return;
 | 
			
		||||
 | 
			
		||||
   switch (from) {
 | 
			
		||||
   case FROM_NONE:
 | 
			
		||||
      glCallList(LODdlist[lod]);
 | 
			
		||||
 | 
			
		||||
      depth++;
 | 
			
		||||
      drawipers(depth, FROM_DOWN);
 | 
			
		||||
      drawipers(depth, FROM_UP);
 | 
			
		||||
      drawipers(depth, FROM_FRONT);
 | 
			
		||||
      drawipers(depth, FROM_BACK);
 | 
			
		||||
      drawipers(depth, FROM_LEFT);
 | 
			
		||||
      drawipers(depth, FROM_RIGHT);
 | 
			
		||||
      break;
 | 
			
		||||
   case FROM_FRONT:
 | 
			
		||||
      glPushMatrix();
 | 
			
		||||
      glTranslatef(0.0f, -1.5f, 0.0f);
 | 
			
		||||
      glScalef(0.5f, 0.5f, 0.5f);
 | 
			
		||||
 | 
			
		||||
      glCallList(LODdlist[lod]);
 | 
			
		||||
 | 
			
		||||
      depth++;
 | 
			
		||||
      drawipers(depth, FROM_DOWN);
 | 
			
		||||
      drawipers(depth, FROM_UP);
 | 
			
		||||
      drawipers(depth, FROM_FRONT);
 | 
			
		||||
      drawipers(depth, FROM_LEFT);
 | 
			
		||||
      drawipers(depth, FROM_RIGHT);
 | 
			
		||||
      glPopMatrix();
 | 
			
		||||
      break;
 | 
			
		||||
   case FROM_BACK:
 | 
			
		||||
      glPushMatrix();
 | 
			
		||||
      glTranslatef(0.0f, 1.5f, 0.0f);
 | 
			
		||||
      glScalef(0.5f, 0.5f, 0.5f);
 | 
			
		||||
 | 
			
		||||
      glCallList(LODdlist[lod]);
 | 
			
		||||
 | 
			
		||||
      depth++;
 | 
			
		||||
      drawipers(depth, FROM_DOWN);
 | 
			
		||||
      drawipers(depth, FROM_UP);
 | 
			
		||||
      drawipers(depth, FROM_BACK);
 | 
			
		||||
      drawipers(depth, FROM_LEFT);
 | 
			
		||||
      drawipers(depth, FROM_RIGHT);
 | 
			
		||||
      glPopMatrix();
 | 
			
		||||
      break;
 | 
			
		||||
   case FROM_LEFT:
 | 
			
		||||
      glPushMatrix();
 | 
			
		||||
      glTranslatef(-1.5f, 0.0f, 0.0f);
 | 
			
		||||
      glScalef(0.5f, 0.5f, 0.5f);
 | 
			
		||||
 | 
			
		||||
      glCallList(LODdlist[lod]);
 | 
			
		||||
 | 
			
		||||
      depth++;
 | 
			
		||||
      drawipers(depth, FROM_DOWN);
 | 
			
		||||
      drawipers(depth, FROM_UP);
 | 
			
		||||
      drawipers(depth, FROM_FRONT);
 | 
			
		||||
      drawipers(depth, FROM_BACK);
 | 
			
		||||
      drawipers(depth, FROM_LEFT);
 | 
			
		||||
      glPopMatrix();
 | 
			
		||||
      break;
 | 
			
		||||
   case FROM_RIGHT:
 | 
			
		||||
      glPushMatrix();
 | 
			
		||||
      glTranslatef(1.5f, 0.0f, 0.0f);
 | 
			
		||||
      glScalef(0.5f, 0.5f, 0.5f);
 | 
			
		||||
 | 
			
		||||
      glCallList(LODdlist[lod]);
 | 
			
		||||
 | 
			
		||||
      depth++;
 | 
			
		||||
      drawipers(depth, FROM_DOWN);
 | 
			
		||||
      drawipers(depth, FROM_UP);
 | 
			
		||||
      drawipers(depth, FROM_FRONT);
 | 
			
		||||
      drawipers(depth, FROM_BACK);
 | 
			
		||||
      drawipers(depth, FROM_RIGHT);
 | 
			
		||||
      glPopMatrix();
 | 
			
		||||
      break;
 | 
			
		||||
   case FROM_DOWN:
 | 
			
		||||
      glPushMatrix();
 | 
			
		||||
      glTranslatef(0.0f, 0.0f, 1.5f);
 | 
			
		||||
      glScalef(0.5f, 0.5f, 0.5f);
 | 
			
		||||
 | 
			
		||||
      glCallList(LODdlist[lod]);
 | 
			
		||||
 | 
			
		||||
      depth++;
 | 
			
		||||
      drawipers(depth, FROM_DOWN);
 | 
			
		||||
      drawipers(depth, FROM_FRONT);
 | 
			
		||||
      drawipers(depth, FROM_BACK);
 | 
			
		||||
      drawipers(depth, FROM_LEFT);
 | 
			
		||||
      drawipers(depth, FROM_RIGHT);
 | 
			
		||||
      glPopMatrix();
 | 
			
		||||
      break;
 | 
			
		||||
   case FROM_UP:
 | 
			
		||||
      glPushMatrix();
 | 
			
		||||
      glTranslatef(0.0f, 0.0f, -1.5f);
 | 
			
		||||
      glScalef(0.5f, 0.5f, 0.5f);
 | 
			
		||||
 | 
			
		||||
      glCallList(LODdlist[lod]);
 | 
			
		||||
 | 
			
		||||
      depth++;
 | 
			
		||||
      drawipers(depth, FROM_UP);
 | 
			
		||||
      drawipers(depth, FROM_FRONT);
 | 
			
		||||
      drawipers(depth, FROM_BACK);
 | 
			
		||||
      drawipers(depth, FROM_LEFT);
 | 
			
		||||
      drawipers(depth, FROM_RIGHT);
 | 
			
		||||
      glPopMatrix();
 | 
			
		||||
      break;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   totpoly += LODnumpoly[lod];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
draw(void)
 | 
			
		||||
{
 | 
			
		||||
   static char frbuf[80] = "";
 | 
			
		||||
   static GLfloat alpha = 0.0f;
 | 
			
		||||
   static GLfloat beta = 0.0f;
 | 
			
		||||
   static float fr = 0.0;
 | 
			
		||||
 | 
			
		||||
   dojoy();
 | 
			
		||||
 | 
			
		||||
   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 | 
			
		||||
 | 
			
		||||
   if (usetex)
 | 
			
		||||
      glEnable(GL_TEXTURE_2D);
 | 
			
		||||
   else
 | 
			
		||||
      glDisable(GL_TEXTURE_2D);
 | 
			
		||||
 | 
			
		||||
   if (fog)
 | 
			
		||||
      glEnable(GL_FOG);
 | 
			
		||||
   else
 | 
			
		||||
      glDisable(GL_FOG);
 | 
			
		||||
 | 
			
		||||
   glPushMatrix();
 | 
			
		||||
   calcposobs();
 | 
			
		||||
   gluLookAt(obs[0], obs[1], obs[2],
 | 
			
		||||
	     obs[0] + dir[0], obs[1] + dir[1], obs[2] + dir[2],
 | 
			
		||||
	     0.0, 0.0, 1.0);
 | 
			
		||||
 | 
			
		||||
   /* Scene */
 | 
			
		||||
   glEnable(GL_DEPTH_TEST);
 | 
			
		||||
 | 
			
		||||
   glShadeModel(GL_SMOOTH);
 | 
			
		||||
   glBindTexture(GL_TEXTURE_2D, t1id);
 | 
			
		||||
   glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
 | 
			
		||||
   glColor3f(1.0f, 1.0f, 1.0f);
 | 
			
		||||
   glEnable(GL_LIGHT0);
 | 
			
		||||
   glEnable(GL_LIGHTING);
 | 
			
		||||
 | 
			
		||||
   if (normext)
 | 
			
		||||
      glEnable(GL_RESCALE_NORMAL_EXT);
 | 
			
		||||
   else
 | 
			
		||||
      glEnable(GL_NORMALIZE);
 | 
			
		||||
 | 
			
		||||
   glPushMatrix();
 | 
			
		||||
   glRotatef(alpha, 0.0f, 0.0f, 1.0f);
 | 
			
		||||
   glRotatef(beta, 1.0f, 0.0f, 0.0f);
 | 
			
		||||
   totpoly = 0;
 | 
			
		||||
   drawipers(0, FROM_NONE);
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
 | 
			
		||||
   alpha += 0.5f;
 | 
			
		||||
   beta += 0.3f;
 | 
			
		||||
 | 
			
		||||
   glDisable(GL_LIGHTING);
 | 
			
		||||
   glDisable(GL_LIGHT0);
 | 
			
		||||
   glShadeModel(GL_FLAT);
 | 
			
		||||
 | 
			
		||||
   if (normext)
 | 
			
		||||
      glDisable(GL_RESCALE_NORMAL_EXT);
 | 
			
		||||
   else
 | 
			
		||||
      glDisable(GL_NORMALIZE);
 | 
			
		||||
 | 
			
		||||
   glCallList(skydlist);
 | 
			
		||||
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
 | 
			
		||||
   /* Help Screen */
 | 
			
		||||
 | 
			
		||||
   sprintf(frbuf,
 | 
			
		||||
	   "Frame rate: %0.2f   LOD: %d   Tot. poly.: %d   Poly/sec: %.1f",
 | 
			
		||||
	   fr, LODbias, totpoly, totpoly * fr);
 | 
			
		||||
 | 
			
		||||
   glDisable(GL_TEXTURE_2D);
 | 
			
		||||
   glDisable(GL_FOG);
 | 
			
		||||
   glShadeModel(GL_FLAT);
 | 
			
		||||
   glDisable(GL_DEPTH_TEST);
 | 
			
		||||
 | 
			
		||||
   glMatrixMode(GL_PROJECTION);
 | 
			
		||||
   glPushMatrix();
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glOrtho(-0.5, 639.5, -0.5, 479.5, -1.0, 1.0);
 | 
			
		||||
 | 
			
		||||
   glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
 | 
			
		||||
   glColor3f(1.0, 0.0, 0.0);
 | 
			
		||||
   glRasterPos2i(10, 10);
 | 
			
		||||
   printstring(GLUT_BITMAP_HELVETICA_18, frbuf);
 | 
			
		||||
   glRasterPos2i(350, 470);
 | 
			
		||||
   printstring(GLUT_BITMAP_HELVETICA_10,
 | 
			
		||||
	       "IperS V1.0 Written by David Bucciarelli (tech.hmw@plus.it)");
 | 
			
		||||
 | 
			
		||||
   if (help)
 | 
			
		||||
      printhelp();
 | 
			
		||||
 | 
			
		||||
   glMatrixMode(GL_PROJECTION);
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
   glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
 | 
			
		||||
   glutSwapBuffers();
 | 
			
		||||
 | 
			
		||||
   Frames++;
 | 
			
		||||
   {
 | 
			
		||||
      GLint t = glutGet(GLUT_ELAPSED_TIME);
 | 
			
		||||
      if (t - T0 >= 2000) {
 | 
			
		||||
         GLfloat seconds = (t - T0) / 1000.0;
 | 
			
		||||
         fr = Frames / seconds;
 | 
			
		||||
         T0 = t;
 | 
			
		||||
         Frames = 0;
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int
 | 
			
		||||
main(int ac, char **av)
 | 
			
		||||
{
 | 
			
		||||
   float fogcolor[4] = { 0.7, 0.7, 0.7, 1.0 };
 | 
			
		||||
 | 
			
		||||
   fprintf(stderr,
 | 
			
		||||
	   "IperS V1.0\nWritten by David Bucciarelli (tech.hmw@plus.it)\n");
 | 
			
		||||
 | 
			
		||||
   glutInitWindowPosition(0, 0);
 | 
			
		||||
   glutInitWindowSize(WIDTH, HEIGHT);
 | 
			
		||||
   glutInit(&ac, av);
 | 
			
		||||
 | 
			
		||||
   glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
 | 
			
		||||
 | 
			
		||||
   if (!(win = glutCreateWindow("IperS"))) {
 | 
			
		||||
      fprintf(stderr, "Error, couldn't open window\n");
 | 
			
		||||
      exit(-1);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   reshape(WIDTH, HEIGHT);
 | 
			
		||||
 | 
			
		||||
   glShadeModel(GL_SMOOTH);
 | 
			
		||||
   glEnable(GL_DEPTH_TEST);
 | 
			
		||||
   glEnable(GL_CULL_FACE);
 | 
			
		||||
   glEnable(GL_TEXTURE_2D);
 | 
			
		||||
 | 
			
		||||
   glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 | 
			
		||||
 | 
			
		||||
   glEnable(GL_FOG);
 | 
			
		||||
   glFogi(GL_FOG_MODE, GL_EXP2);
 | 
			
		||||
   glFogfv(GL_FOG_COLOR, fogcolor);
 | 
			
		||||
 | 
			
		||||
   glFogf(GL_FOG_DENSITY, 0.006);
 | 
			
		||||
 | 
			
		||||
   glHint(GL_FOG_HINT, GL_NICEST);
 | 
			
		||||
 | 
			
		||||
   inittextures();
 | 
			
		||||
   initdlists();
 | 
			
		||||
   initlight();
 | 
			
		||||
 | 
			
		||||
   glClearColor(fogcolor[0], fogcolor[1], fogcolor[2], fogcolor[3]);
 | 
			
		||||
   glClear(GL_COLOR_BUFFER_BIT);
 | 
			
		||||
 | 
			
		||||
   calcposobs();
 | 
			
		||||
 | 
			
		||||
   glutReshapeFunc(reshape);
 | 
			
		||||
   glutDisplayFunc(draw);
 | 
			
		||||
   glutKeyboardFunc(key);
 | 
			
		||||
   glutSpecialFunc(special);
 | 
			
		||||
   glutIdleFunc(draw);
 | 
			
		||||
 | 
			
		||||
   glutMainLoop();
 | 
			
		||||
 | 
			
		||||
   return 0;
 | 
			
		||||
}
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										236
									
								
								progs/demos/lodbias.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										236
									
								
								progs/demos/lodbias.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,236 @@
 | 
			
		||||
/*
 | 
			
		||||
 * GL_EXT_texture_lod_bias demo
 | 
			
		||||
 *
 | 
			
		||||
 * Thanks to Michael Vance for implementing this extension in Mesa.
 | 
			
		||||
 *
 | 
			
		||||
 * Brian Paul
 | 
			
		||||
 * 20 March 2000
 | 
			
		||||
 *
 | 
			
		||||
 * Copyright (C) 2000  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * 
 | 
			
		||||
 * Permission is hereby granted, free of charge, to any person obtaining a
 | 
			
		||||
 * copy of this software and associated documentation files (the "Software"),
 | 
			
		||||
 * to deal in the Software without restriction, including without limitation
 | 
			
		||||
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 | 
			
		||||
 * and/or sell copies of the Software, and to permit persons to whom the
 | 
			
		||||
 * Software is furnished to do so, subject to the following conditions:
 | 
			
		||||
 * 
 | 
			
		||||
 * The above copyright notice and this permission notice shall be included
 | 
			
		||||
 * in all copies or substantial portions of the Software.
 | 
			
		||||
 * 
 | 
			
		||||
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 | 
			
		||||
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
			
		||||
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 | 
			
		||||
 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
 | 
			
		||||
 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 | 
			
		||||
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
#include <GL/glext.h>
 | 
			
		||||
 | 
			
		||||
#include "readtex.c"   /* I know, this is a hack. */
 | 
			
		||||
 | 
			
		||||
#define TEXTURE_FILE "../images/girl.rgb"
 | 
			
		||||
 | 
			
		||||
static GLfloat Xrot = 0, Yrot = -30, Zrot = 0;
 | 
			
		||||
static GLboolean Anim = GL_TRUE;
 | 
			
		||||
static GLint Bias = 0, BiasStepSign = +1; /* ints avoid fp precision problem */
 | 
			
		||||
static GLint BiasMin = -400, BiasMax = 400;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
PrintString(const char *s)
 | 
			
		||||
{
 | 
			
		||||
   while (*s) {
 | 
			
		||||
      glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s);
 | 
			
		||||
      s++;
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void Idle( void )
 | 
			
		||||
{
 | 
			
		||||
   static int lastTime = 0;
 | 
			
		||||
   int time = glutGet(GLUT_ELAPSED_TIME);
 | 
			
		||||
   int step;
 | 
			
		||||
 | 
			
		||||
   if (lastTime == 0)
 | 
			
		||||
      lastTime = time;
 | 
			
		||||
   else if (time - lastTime < 10)
 | 
			
		||||
      return;
 | 
			
		||||
 | 
			
		||||
   step = (time - lastTime) / 10 * BiasStepSign;
 | 
			
		||||
   lastTime = time;
 | 
			
		||||
 | 
			
		||||
   Bias += step;
 | 
			
		||||
   if (Bias < BiasMin) {
 | 
			
		||||
      Bias = BiasMin;
 | 
			
		||||
      BiasStepSign = +1;
 | 
			
		||||
   }
 | 
			
		||||
   else if (Bias > BiasMax) {
 | 
			
		||||
      Bias = BiasMax;
 | 
			
		||||
      BiasStepSign = -1;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void Display( void )
 | 
			
		||||
{
 | 
			
		||||
   char str[100];
 | 
			
		||||
 | 
			
		||||
   glClear( GL_COLOR_BUFFER_BIT );
 | 
			
		||||
 | 
			
		||||
   glMatrixMode( GL_PROJECTION );
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glOrtho(-1, 1, -1, 1, -1, 1);
 | 
			
		||||
   glMatrixMode( GL_MODELVIEW );
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   
 | 
			
		||||
   glDisable(GL_TEXTURE_2D);
 | 
			
		||||
   glColor3f(1,1,1);
 | 
			
		||||
   glRasterPos3f(-0.9, -0.9, 0.0);
 | 
			
		||||
   sprintf(str, "Texture LOD Bias = %4.1f", Bias * 0.01);
 | 
			
		||||
   PrintString(str);
 | 
			
		||||
 | 
			
		||||
   glMatrixMode( GL_PROJECTION );
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 );
 | 
			
		||||
   glMatrixMode( GL_MODELVIEW );
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glTranslatef( 0.0, 0.0, -8.0 );
 | 
			
		||||
 | 
			
		||||
   glPushMatrix();
 | 
			
		||||
   glRotatef(Xrot, 1, 0, 0);
 | 
			
		||||
   glRotatef(Yrot, 0, 1, 0);
 | 
			
		||||
   glRotatef(Zrot, 0, 0, 1);
 | 
			
		||||
 | 
			
		||||
   glEnable(GL_TEXTURE_2D);
 | 
			
		||||
   glTexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT, GL_TEXTURE_LOD_BIAS_EXT, 0.01 * Bias);
 | 
			
		||||
 | 
			
		||||
   glBegin(GL_POLYGON);
 | 
			
		||||
   glTexCoord2f(0, 0);  glVertex2f(-1, -1);
 | 
			
		||||
   glTexCoord2f(2, 0);  glVertex2f( 1, -1);
 | 
			
		||||
   glTexCoord2f(2, 2);  glVertex2f( 1,  1);
 | 
			
		||||
   glTexCoord2f(0, 2);  glVertex2f(-1,  1);
 | 
			
		||||
   glEnd();
 | 
			
		||||
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
 | 
			
		||||
   glutSwapBuffers();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void Reshape( int width, int height )
 | 
			
		||||
{
 | 
			
		||||
   glViewport( 0, 0, width, height );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void Key( unsigned char key, int x, int y )
 | 
			
		||||
{
 | 
			
		||||
   const GLfloat step = 3.0;
 | 
			
		||||
   (void) x;
 | 
			
		||||
   (void) y;
 | 
			
		||||
   switch (key) {
 | 
			
		||||
      case 'a':
 | 
			
		||||
         Anim = !Anim;
 | 
			
		||||
         if (Anim)
 | 
			
		||||
            glutIdleFunc(Idle);
 | 
			
		||||
         else
 | 
			
		||||
            glutIdleFunc(NULL);
 | 
			
		||||
         break;
 | 
			
		||||
      case 'z':
 | 
			
		||||
         Zrot -= step;
 | 
			
		||||
         break;
 | 
			
		||||
      case 'Z':
 | 
			
		||||
         Zrot += step;
 | 
			
		||||
         break;
 | 
			
		||||
      case 'b':
 | 
			
		||||
         Bias -= 10;
 | 
			
		||||
         break;
 | 
			
		||||
      case 'B':
 | 
			
		||||
         Bias += 10;
 | 
			
		||||
         break;
 | 
			
		||||
      case 27:
 | 
			
		||||
         exit(0);
 | 
			
		||||
         break;
 | 
			
		||||
   }
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void SpecialKey( int key, int x, int y )
 | 
			
		||||
{
 | 
			
		||||
   const GLfloat step = 3.0;
 | 
			
		||||
   (void) x;
 | 
			
		||||
   (void) y;
 | 
			
		||||
   switch (key) {
 | 
			
		||||
      case GLUT_KEY_UP:
 | 
			
		||||
         Xrot -= step;
 | 
			
		||||
         break;
 | 
			
		||||
      case GLUT_KEY_DOWN:
 | 
			
		||||
         Xrot += step;
 | 
			
		||||
         break;
 | 
			
		||||
      case GLUT_KEY_LEFT:
 | 
			
		||||
         Yrot -= step;
 | 
			
		||||
         break;
 | 
			
		||||
      case GLUT_KEY_RIGHT:
 | 
			
		||||
         Yrot += step;
 | 
			
		||||
         break;
 | 
			
		||||
   }
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void Init( void )
 | 
			
		||||
{
 | 
			
		||||
   const char *exten = (const char *) glGetString(GL_EXTENSIONS);
 | 
			
		||||
   GLfloat maxBias;
 | 
			
		||||
 | 
			
		||||
   if (!strstr(exten, "GL_EXT_texture_lod_bias")) {
 | 
			
		||||
      printf("Sorry, GL_EXT_texture_lod_bias not supported by this renderer.\n");
 | 
			
		||||
      exit(1);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
 | 
			
		||||
   if (!LoadRGBMipmaps(TEXTURE_FILE, GL_RGB)) {
 | 
			
		||||
      printf("Error: could not load texture image %s\n", TEXTURE_FILE);
 | 
			
		||||
      exit(1);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   /* mipmapping required for this extension */
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 | 
			
		||||
   glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
 | 
			
		||||
 | 
			
		||||
   glGetFloatv(GL_MAX_TEXTURE_LOD_BIAS_EXT, &maxBias);
 | 
			
		||||
   printf("LOD bias range: [%g, %g]\n", -maxBias, maxBias);
 | 
			
		||||
   BiasMin = -100 * maxBias;
 | 
			
		||||
   BiasMax =  100 * maxBias;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int main( int argc, char *argv[] )
 | 
			
		||||
{
 | 
			
		||||
   glutInit( &argc, argv );
 | 
			
		||||
   glutInitWindowPosition( 0, 0 );
 | 
			
		||||
   glutInitWindowSize( 350, 350 );
 | 
			
		||||
   glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
 | 
			
		||||
   glutCreateWindow(argv[0]);
 | 
			
		||||
   glutReshapeFunc( Reshape );
 | 
			
		||||
   glutKeyboardFunc( Key );
 | 
			
		||||
   glutSpecialFunc( SpecialKey );
 | 
			
		||||
   glutDisplayFunc( Display );
 | 
			
		||||
   if (Anim)
 | 
			
		||||
      glutIdleFunc(Idle);
 | 
			
		||||
   Init();
 | 
			
		||||
   glutMainLoop();
 | 
			
		||||
   return 0;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,7 +1,13 @@
 | 
			
		||||
/* $Id: morph3d.c,v 1.2 1999/09/17 12:27:01 brianp Exp $ */
 | 
			
		||||
/* $Id: morph3d.c,v 1.4 2000/06/27 17:04:43 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: morph3d.c,v $
 | 
			
		||||
 * Revision 1.4  2000/06/27 17:04:43  brianp
 | 
			
		||||
 * fixed compiler warnings
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.3  1999/12/15 13:00:45  brianp
 | 
			
		||||
 * moved #define to column 0
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.2  1999/09/17 12:27:01  brianp
 | 
			
		||||
 * silenced some warnings
 | 
			
		||||
 *
 | 
			
		||||
@@ -498,7 +504,7 @@ static void draw_dodeca( void )
 | 
			
		||||
{
 | 
			
		||||
  GLuint list;
 | 
			
		||||
 | 
			
		||||
  #define TAU ((SQRT5+1)/2)
 | 
			
		||||
#define TAU ((SQRT5+1)/2)
 | 
			
		||||
 | 
			
		||||
  list = glGenLists( 1 );
 | 
			
		||||
  glNewList( list, GL_COMPILE );
 | 
			
		||||
@@ -827,7 +833,7 @@ static void pinit(void)
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void INIT(void)
 | 
			
		||||
static void INIT(void)
 | 
			
		||||
{
 | 
			
		||||
  printf("Morph 3D - Shows morphing platonic polyhedra\n");
 | 
			
		||||
  printf("Author: Marcelo Fernandes Vianna (vianna@cat.cbpf.br)\n\n");
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: multiarb.c,v 1.3 1999/10/21 16:40:32 brianp Exp $ */
 | 
			
		||||
/* $Id: multiarb.c,v 1.10.2.2 2002/09/13 18:15:09 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * GL_ARB_multitexture demo
 | 
			
		||||
@@ -10,36 +10,15 @@
 | 
			
		||||
 * Brian Paul  November 1998  This program is in the public domain.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: multiarb.c,v $
 | 
			
		||||
 * Revision 1.3  1999/10/21 16:40:32  brianp
 | 
			
		||||
 * added -info command line option
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.2  1999/10/13 12:02:13  brianp
 | 
			
		||||
 * use texture objects now
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.1.1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Imported sources
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.3  1999/03/28 18:20:49  brianp
 | 
			
		||||
 * minor clean-up
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.2  1998/11/05 04:34:04  brianp
 | 
			
		||||
 * moved image files to ../images/ directory
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.1  1998/11/03 01:36:33  brianp
 | 
			
		||||
 * Initial revision
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#define GL_GLEXT_PROTOTYPES
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
 | 
			
		||||
#include "../util/readtex.c"   /* I know, this is a hack. */
 | 
			
		||||
#include "readtex.c"   /* I know, this is a hack. */
 | 
			
		||||
 | 
			
		||||
#define TEXTURE_1_FILE "../images/girl.rgb"
 | 
			
		||||
#define TEXTURE_2_FILE "../images/reflect.rgb"
 | 
			
		||||
@@ -61,6 +40,8 @@ static void Idle( void )
 | 
			
		||||
{
 | 
			
		||||
   if (Animate) {
 | 
			
		||||
      Drift += 0.05;
 | 
			
		||||
      if (Drift >= 1.0)
 | 
			
		||||
         Drift = 0.0;
 | 
			
		||||
 | 
			
		||||
#ifdef GL_ARB_multitexture
 | 
			
		||||
      glActiveTextureARB(GL_TEXTURE0_ARB);
 | 
			
		||||
@@ -235,6 +216,7 @@ static void SpecialKey( int key, int x, int y )
 | 
			
		||||
static void Init( int argc, char *argv[] )
 | 
			
		||||
{
 | 
			
		||||
   GLuint texObj[2];
 | 
			
		||||
   GLint units, size;
 | 
			
		||||
 | 
			
		||||
   const char *exten = (const char *) glGetString(GL_EXTENSIONS);
 | 
			
		||||
   if (!strstr(exten, "GL_ARB_multitexture")) {
 | 
			
		||||
@@ -242,6 +224,14 @@ static void Init( int argc, char *argv[] )
 | 
			
		||||
      exit(1);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &units);
 | 
			
		||||
   printf("%d texture units supported\n", units);
 | 
			
		||||
 | 
			
		||||
   glGetIntegerv(GL_MAX_TEXTURE_SIZE, &size);
 | 
			
		||||
   printf("%d x %d max texture size\n", size, size);
 | 
			
		||||
 | 
			
		||||
   glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
 | 
			
		||||
 | 
			
		||||
   /* allocate two texture objects */
 | 
			
		||||
   glGenTextures(2, texObj);
 | 
			
		||||
 | 
			
		||||
@@ -255,11 +245,6 @@ static void Init( int argc, char *argv[] )
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
 | 
			
		||||
 | 
			
		||||
   glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
 | 
			
		||||
 | 
			
		||||
   if (!LoadRGBMipmaps(TEXTURE_1_FILE, GL_RGB)) {
 | 
			
		||||
      printf("Error: couldn't load texture image\n");
 | 
			
		||||
      exit(1);
 | 
			
		||||
@@ -276,9 +261,6 @@ static void Init( int argc, char *argv[] )
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
 | 
			
		||||
 | 
			
		||||
   if (!LoadRGBMipmaps(TEXTURE_2_FILE, GL_RGB)) {
 | 
			
		||||
      printf("Error: couldn't load texture image\n");
 | 
			
		||||
      exit(1);
 | 
			
		||||
@@ -289,8 +271,10 @@ static void Init( int argc, char *argv[] )
 | 
			
		||||
#ifdef GL_ARB_multitexture
 | 
			
		||||
   glActiveTextureARB(GL_TEXTURE0_ARB);
 | 
			
		||||
   glBindTexture(GL_TEXTURE_2D, texObj[0]);
 | 
			
		||||
   glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
 | 
			
		||||
   glActiveTextureARB(GL_TEXTURE1_ARB);
 | 
			
		||||
   glBindTexture(GL_TEXTURE_2D, texObj[1]);
 | 
			
		||||
   glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   glShadeModel(GL_FLAT);
 | 
			
		||||
@@ -311,6 +295,7 @@ int main( int argc, char *argv[] )
 | 
			
		||||
{
 | 
			
		||||
   glutInit( &argc, argv );
 | 
			
		||||
   glutInitWindowSize( 300, 300 );
 | 
			
		||||
   glutInitWindowPosition( 0, 0 );
 | 
			
		||||
   glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
 | 
			
		||||
   glutCreateWindow(argv[0] );
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										226
									
								
								progs/demos/occlude.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										226
									
								
								progs/demos/occlude.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,226 @@
 | 
			
		||||
/*
 | 
			
		||||
 * GL_HP_occlustion_test demo
 | 
			
		||||
 *
 | 
			
		||||
 * Brian Paul
 | 
			
		||||
 * 31 March 2000
 | 
			
		||||
 *
 | 
			
		||||
 * Copyright (C) 2000  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * 
 | 
			
		||||
 * Permission is hereby granted, free of charge, to any person obtaining a
 | 
			
		||||
 * copy of this software and associated documentation files (the "Software"),
 | 
			
		||||
 * to deal in the Software without restriction, including without limitation
 | 
			
		||||
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 | 
			
		||||
 * and/or sell copies of the Software, and to permit persons to whom the
 | 
			
		||||
 * Software is furnished to do so, subject to the following conditions:
 | 
			
		||||
 * 
 | 
			
		||||
 * The above copyright notice and this permission notice shall be included
 | 
			
		||||
 * in all copies or substantial portions of the Software.
 | 
			
		||||
 * 
 | 
			
		||||
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 | 
			
		||||
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
			
		||||
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 | 
			
		||||
 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
 | 
			
		||||
 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 | 
			
		||||
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
#include <GL/glext.h>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static GLfloat Xpos = 0;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
PrintString(const char *s)
 | 
			
		||||
{
 | 
			
		||||
   while (*s) {
 | 
			
		||||
      glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s);
 | 
			
		||||
      s++;
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void Idle(void)
 | 
			
		||||
{
 | 
			
		||||
   static int lastTime = 0;
 | 
			
		||||
   static int sign = +1;
 | 
			
		||||
   int time = glutGet(GLUT_ELAPSED_TIME);
 | 
			
		||||
   float step;
 | 
			
		||||
 | 
			
		||||
   if (lastTime == 0)
 | 
			
		||||
      lastTime = time;
 | 
			
		||||
   else if (time - lastTime < 20)  /* 50Hz update */
 | 
			
		||||
      return;
 | 
			
		||||
 | 
			
		||||
   step = (time - lastTime) / 1000.0 * sign;
 | 
			
		||||
   lastTime = time;
 | 
			
		||||
 | 
			
		||||
   Xpos += step;
 | 
			
		||||
 | 
			
		||||
   if (Xpos > 2.5) {
 | 
			
		||||
      Xpos = 2.5;
 | 
			
		||||
      sign = -1;
 | 
			
		||||
   }
 | 
			
		||||
   else if (Xpos < -2.5) {
 | 
			
		||||
      Xpos = -2.5;
 | 
			
		||||
      sign = +1;
 | 
			
		||||
   }
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void Display( void )
 | 
			
		||||
{
 | 
			
		||||
   GLboolean result;
 | 
			
		||||
 | 
			
		||||
   glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
 | 
			
		||||
 | 
			
		||||
   glMatrixMode( GL_PROJECTION );
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 );
 | 
			
		||||
   glMatrixMode( GL_MODELVIEW );
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glTranslatef( 0.0, 0.0, -15.0 );
 | 
			
		||||
 | 
			
		||||
   /* draw the occluding polygons */
 | 
			
		||||
   glColor3f(0, 0.6, 0.8);
 | 
			
		||||
   glBegin(GL_QUADS);
 | 
			
		||||
   glVertex2f(-1.6, -1.5);
 | 
			
		||||
   glVertex2f(-0.4, -1.5);
 | 
			
		||||
   glVertex2f(-0.4,  1.5);
 | 
			
		||||
   glVertex2f(-1.6,  1.5);
 | 
			
		||||
 | 
			
		||||
   glVertex2f( 0.4, -1.5);
 | 
			
		||||
   glVertex2f( 1.6, -1.5);
 | 
			
		||||
   glVertex2f( 1.6,  1.5);
 | 
			
		||||
   glVertex2f( 0.4,  1.5);
 | 
			
		||||
   glEnd();
 | 
			
		||||
 | 
			
		||||
   /* draw the test polygon with occlusion testing */
 | 
			
		||||
   glPushMatrix();
 | 
			
		||||
   glTranslatef(Xpos, 0, -0.5);
 | 
			
		||||
   glScalef(0.3, 0.3, 1.0);
 | 
			
		||||
   glRotatef(-90.0 * Xpos, 0, 0, 1);
 | 
			
		||||
 | 
			
		||||
   glEnable(GL_OCCLUSION_TEST_HP);  /* NOTE: enabling the occlusion test */
 | 
			
		||||
                                    /* doesn't clear the result flag! */
 | 
			
		||||
   glColorMask(0, 0, 0, 0);
 | 
			
		||||
   glDepthMask(GL_FALSE);
 | 
			
		||||
   /* this call clear's the result flag.  Not really needed for this demo. */
 | 
			
		||||
   glGetBooleanv(GL_OCCLUSION_TEST_RESULT_HP, &result);
 | 
			
		||||
 | 
			
		||||
   glBegin(GL_POLYGON);
 | 
			
		||||
   glVertex3f(-1, -1, 0);
 | 
			
		||||
   glVertex3f( 1, -1, 0);
 | 
			
		||||
   glVertex3f( 1,  1, 0);
 | 
			
		||||
   glVertex3f(-1,  1, 0);
 | 
			
		||||
   glEnd();
 | 
			
		||||
 | 
			
		||||
   glGetBooleanv(GL_OCCLUSION_TEST_RESULT_HP, &result);
 | 
			
		||||
   /* turn off occlusion testing */
 | 
			
		||||
   glDisable(GL_OCCLUSION_TEST_HP);
 | 
			
		||||
   glColorMask(1, 1, 1, 1);
 | 
			
		||||
   glDepthMask(GL_TRUE);
 | 
			
		||||
 | 
			
		||||
   /* draw the green rect, so we can see what's going on */
 | 
			
		||||
   glColor3f(0.8, 0.5, 0);
 | 
			
		||||
   glBegin(GL_POLYGON);
 | 
			
		||||
   glVertex3f(-1, -1, 0);
 | 
			
		||||
   glVertex3f( 1, -1, 0);
 | 
			
		||||
   glVertex3f( 1,  1, 0);
 | 
			
		||||
   glVertex3f(-1,  1, 0);
 | 
			
		||||
   glEnd();
 | 
			
		||||
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   /* Print result message */
 | 
			
		||||
   glMatrixMode( GL_PROJECTION );
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glOrtho( -1.0, 1.0, -1.0, 1.0, -1.0, 1.0 );
 | 
			
		||||
   glMatrixMode( GL_MODELVIEW );
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
 | 
			
		||||
   glColor3f(1, 1, 1);
 | 
			
		||||
   glRasterPos3f(-0.25, -0.7, 0);
 | 
			
		||||
 | 
			
		||||
   if (result)
 | 
			
		||||
      PrintString("   Visible");
 | 
			
		||||
   else
 | 
			
		||||
      PrintString("Fully Occluded");
 | 
			
		||||
 | 
			
		||||
   glutSwapBuffers();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void Reshape( int width, int height )
 | 
			
		||||
{
 | 
			
		||||
   glViewport( 0, 0, width, height );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void Key( unsigned char key, int x, int y )
 | 
			
		||||
{
 | 
			
		||||
   (void) x;
 | 
			
		||||
   (void) y;
 | 
			
		||||
   switch (key) {
 | 
			
		||||
      case 27:
 | 
			
		||||
         exit(0);
 | 
			
		||||
         break;
 | 
			
		||||
   }
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void SpecialKey( int key, int x, int y )
 | 
			
		||||
{
 | 
			
		||||
   const GLfloat step = 0.1;
 | 
			
		||||
   (void) x;
 | 
			
		||||
   (void) y;
 | 
			
		||||
   switch (key) {
 | 
			
		||||
      case GLUT_KEY_LEFT:
 | 
			
		||||
         Xpos -= step;
 | 
			
		||||
         break;
 | 
			
		||||
      case GLUT_KEY_RIGHT:
 | 
			
		||||
         Xpos += step;
 | 
			
		||||
         break;
 | 
			
		||||
   }
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void Init( void )
 | 
			
		||||
{
 | 
			
		||||
   const char *ext = (const char *) glGetString(GL_EXTENSIONS);
 | 
			
		||||
   if (!strstr(ext, "GL_HP_occlusion_test")) {
 | 
			
		||||
      printf("Sorry, this demo requires the GL_HP_occlusion_test extension\n");
 | 
			
		||||
      exit(-1);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glEnable(GL_DEPTH_TEST);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int main( int argc, char *argv[] )
 | 
			
		||||
{
 | 
			
		||||
   glutInit( &argc, argv );
 | 
			
		||||
   glutInitWindowPosition( 0, 0 );
 | 
			
		||||
   glutInitWindowSize( 400, 400 );
 | 
			
		||||
   glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
 | 
			
		||||
   glutCreateWindow(argv[0]);
 | 
			
		||||
   glutReshapeFunc( Reshape );
 | 
			
		||||
   glutKeyboardFunc( Key );
 | 
			
		||||
   glutSpecialFunc( SpecialKey );
 | 
			
		||||
   glutIdleFunc( Idle );
 | 
			
		||||
   glutDisplayFunc( Display );
 | 
			
		||||
   Init();
 | 
			
		||||
   glutMainLoop();
 | 
			
		||||
   return 0;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: osdemo.c,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
 | 
			
		||||
/* $Id: osdemo.c,v 1.7.2.1 2002/04/15 21:22:36 kschultz Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Demo of off-screen Mesa rendering
 | 
			
		||||
@@ -14,32 +14,29 @@
 | 
			
		||||
 *
 | 
			
		||||
 * PPM output provided by Joerg Schmalzl.
 | 
			
		||||
 * ASCII PPM output added by Brian Paul.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: osdemo.c,v $
 | 
			
		||||
 * Revision 1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Initial revision
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.0  1998/02/14 18:42:29  brianp
 | 
			
		||||
 * initial rev
 | 
			
		||||
 * Usage: osdemo [-perf] [filename]
 | 
			
		||||
 *
 | 
			
		||||
 * -perf: Redraws the image 1000 times, displaying the FPS every 5 secs.
 | 
			
		||||
 * filename: file to store the TGA or PPM output
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include "GL/osmesa.h"
 | 
			
		||||
#include "GL/glut.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define SAVE_TARGA
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define WIDTH 400
 | 
			
		||||
#define HEIGHT 400
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static GLint T0 = 0;
 | 
			
		||||
static GLint Frames = 0;
 | 
			
		||||
static int perf = 0;
 | 
			
		||||
 | 
			
		||||
static void render_image( void )
 | 
			
		||||
{
 | 
			
		||||
@@ -85,76 +82,223 @@ static void render_image( void )
 | 
			
		||||
   glutSolidCone(1.0, 2.0, 16, 1);
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
 | 
			
		||||
#ifdef GL_HP_occlusion_test
 | 
			
		||||
   if (perf == 0) {
 | 
			
		||||
      GLboolean bRet;
 | 
			
		||||
      glDepthMask(GL_FALSE);
 | 
			
		||||
      glColorMask(GL_FALSE,GL_FALSE,GL_FALSE,GL_FALSE);
 | 
			
		||||
      glEnable(GL_OCCLUSION_TEST_HP);
 | 
			
		||||
      glGetBooleanv(GL_OCCLUSION_TEST_RESULT_HP,&bRet);
 | 
			
		||||
 | 
			
		||||
      glPushMatrix();
 | 
			
		||||
      glTranslatef(0.75, 0.0, -1.0);
 | 
			
		||||
      glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, blue_mat );
 | 
			
		||||
      glutSolidSphere(1.0, 20, 20);
 | 
			
		||||
      glPopMatrix();
 | 
			
		||||
 | 
			
		||||
      glGetBooleanv(GL_OCCLUSION_TEST_RESULT_HP,&bRet);
 | 
			
		||||
      printf("Occlusion test 1 (result should be 1): %d\n",bRet);
 | 
			
		||||
 | 
			
		||||
      glDepthMask(GL_TRUE);
 | 
			
		||||
      glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_TRUE);
 | 
			
		||||
      glDisable(GL_OCCLUSION_TEST_HP);
 | 
			
		||||
   }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   glPushMatrix();
 | 
			
		||||
   glTranslatef(0.75, 0.0, -1.0); 
 | 
			
		||||
   glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, blue_mat );
 | 
			
		||||
   glutSolidSphere(1.0, 20, 20);
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
 | 
			
		||||
#ifdef GL_HP_occlusion_test
 | 
			
		||||
   if (perf == 0){
 | 
			
		||||
      GLboolean bRet;
 | 
			
		||||
 | 
			
		||||
      glDepthMask(GL_FALSE);
 | 
			
		||||
      glColorMask(GL_FALSE,GL_FALSE,GL_FALSE,GL_FALSE);
 | 
			
		||||
      glEnable(GL_OCCLUSION_TEST_HP);
 | 
			
		||||
      glGetBooleanv(GL_OCCLUSION_TEST_RESULT_HP,&bRet);
 | 
			
		||||
 | 
			
		||||
      /* draw a sphere inside the previous sphere */
 | 
			
		||||
      glPushMatrix();
 | 
			
		||||
      glTranslatef(0.75, 0.0, -1.0);
 | 
			
		||||
      glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, blue_mat );
 | 
			
		||||
      glutSolidSphere(0.5, 20, 20);
 | 
			
		||||
      glPopMatrix();
 | 
			
		||||
 | 
			
		||||
      glGetBooleanv(GL_OCCLUSION_TEST_RESULT_HP,&bRet);
 | 
			
		||||
      printf("Occlusion test 2 (result should be 0): %d\n",bRet);
 | 
			
		||||
 | 
			
		||||
      glDepthMask(GL_TRUE);
 | 
			
		||||
      glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_TRUE);
 | 
			
		||||
      glDisable(GL_OCCLUSION_TEST_HP);
 | 
			
		||||
   }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
 | 
			
		||||
   Frames++;
 | 
			
		||||
   if (perf) {
 | 
			
		||||
     GLint t = glutGet(GLUT_ELAPSED_TIME);
 | 
			
		||||
     if (t - T0 >= 5000) {
 | 
			
		||||
        GLfloat seconds = (t - T0) / 1000.0;
 | 
			
		||||
        GLfloat fps = Frames / seconds;
 | 
			
		||||
        printf("%d frames in %6.3f seconds = %6.3f FPS\n", Frames, seconds, fps);
 | 
			
		||||
        T0 = t;
 | 
			
		||||
        Frames = 0;
 | 
			
		||||
     }
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int main( int argc, char *argv[] )
 | 
			
		||||
static void
 | 
			
		||||
write_targa(const char *filename, const GLubyte *buffer, int width, int height)
 | 
			
		||||
{
 | 
			
		||||
   OSMesaContext ctx;
 | 
			
		||||
   void *buffer;
 | 
			
		||||
   FILE *f = fopen( filename, "w" );
 | 
			
		||||
   if (f) {
 | 
			
		||||
      int i, x, y;
 | 
			
		||||
      const GLubyte *ptr = buffer;
 | 
			
		||||
      printf ("osdemo, writing tga file \n");
 | 
			
		||||
      fputc (0x00, f);	/* ID Length, 0 => No ID	*/
 | 
			
		||||
      fputc (0x00, f);	/* Color Map Type, 0 => No color map included	*/
 | 
			
		||||
      fputc (0x02, f);	/* Image Type, 2 => Uncompressed, True-color Image */
 | 
			
		||||
      fputc (0x00, f);	/* Next five bytes are about the color map entries */
 | 
			
		||||
      fputc (0x00, f);	/* 2 bytes Index, 2 bytes length, 1 byte size */
 | 
			
		||||
      fputc (0x00, f);
 | 
			
		||||
      fputc (0x00, f);
 | 
			
		||||
      fputc (0x00, f);
 | 
			
		||||
      fputc (0x00, f);	/* X-origin of Image	*/
 | 
			
		||||
      fputc (0x00, f);
 | 
			
		||||
      fputc (0x00, f);	/* Y-origin of Image	*/
 | 
			
		||||
      fputc (0x00, f);
 | 
			
		||||
      fputc (WIDTH & 0xff, f);      /* Image Width	*/
 | 
			
		||||
      fputc ((WIDTH>>8) & 0xff, f);
 | 
			
		||||
      fputc (HEIGHT & 0xff, f);     /* Image Height	*/
 | 
			
		||||
      fputc ((HEIGHT>>8) & 0xff, f);
 | 
			
		||||
      fputc (0x18, f);		/* Pixel Depth, 0x18 => 24 Bits	*/
 | 
			
		||||
      fputc (0x20, f);		/* Image Descriptor	*/
 | 
			
		||||
      fclose(f);
 | 
			
		||||
      f = fopen( filename, "ab" );  /* reopen in binary append mode */
 | 
			
		||||
      for (y=height-1; y>=0; y--) {
 | 
			
		||||
         for (x=0; x<width; x++) {
 | 
			
		||||
            i = (y*width + x) * 4;
 | 
			
		||||
            fputc(ptr[i+2], f); /* write blue */
 | 
			
		||||
            fputc(ptr[i+1], f); /* write green */
 | 
			
		||||
            fputc(ptr[i], f);   /* write red */
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
   /* Create an RGBA-mode context */
 | 
			
		||||
   ctx = OSMesaCreateContext( GL_RGBA, NULL );
 | 
			
		||||
 | 
			
		||||
   /* Allocate the image buffer */
 | 
			
		||||
   buffer = malloc( WIDTH * HEIGHT * 4 );
 | 
			
		||||
 | 
			
		||||
   /* Bind the buffer to the context and make it current */
 | 
			
		||||
   OSMesaMakeCurrent( ctx, buffer, GL_UNSIGNED_BYTE, WIDTH, HEIGHT );
 | 
			
		||||
 | 
			
		||||
   render_image();
 | 
			
		||||
 | 
			
		||||
   if (argc>1) {
 | 
			
		||||
      /* write PPM file */
 | 
			
		||||
      FILE *f = fopen( argv[1], "w" );
 | 
			
		||||
      if (f) {
 | 
			
		||||
         int i, x, y;
 | 
			
		||||
         GLubyte *ptr = (GLubyte *) buffer;
 | 
			
		||||
#define BINARY 0
 | 
			
		||||
#if BINARY
 | 
			
		||||
static void
 | 
			
		||||
write_ppm(const char *filename, const GLubyte *buffer, int width, int height)
 | 
			
		||||
{
 | 
			
		||||
   const int binary = 0;
 | 
			
		||||
   FILE *f = fopen( filename, "w" );
 | 
			
		||||
   if (f) {
 | 
			
		||||
      int i, x, y;
 | 
			
		||||
      const GLubyte *ptr = buffer;
 | 
			
		||||
      if (binary) {
 | 
			
		||||
         fprintf(f,"P6\n");
 | 
			
		||||
         fprintf(f,"# ppm-file created by %s\n",  argv[0]);
 | 
			
		||||
         fprintf(f,"%i %i\n", WIDTH,HEIGHT);
 | 
			
		||||
         fprintf(f,"# ppm-file created by osdemo.c\n");
 | 
			
		||||
         fprintf(f,"%i %i\n", width,height);
 | 
			
		||||
         fprintf(f,"255\n");
 | 
			
		||||
         fclose(f);
 | 
			
		||||
         f = fopen( argv[1], "ab" );  /* reopen in binary append mode */
 | 
			
		||||
         for (y=HEIGHT-1; y>=0; y--) {
 | 
			
		||||
            for (x=0; x<WIDTH; x++) {
 | 
			
		||||
               i = (y*WIDTH + x) * 4;
 | 
			
		||||
         f = fopen( filename, "ab" );  /* reopen in binary append mode */
 | 
			
		||||
         for (y=height-1; y>=0; y--) {
 | 
			
		||||
            for (x=0; x<width; x++) {
 | 
			
		||||
               i = (y*width + x) * 4;
 | 
			
		||||
               fputc(ptr[i], f);   /* write red */
 | 
			
		||||
               fputc(ptr[i+1], f); /* write green */
 | 
			
		||||
               fputc(ptr[i+2], f); /* write blue */
 | 
			
		||||
            }
 | 
			
		||||
         }
 | 
			
		||||
#else /*ASCII*/
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
         /*ASCII*/
 | 
			
		||||
         int counter = 0;
 | 
			
		||||
         fprintf(f,"P3\n");
 | 
			
		||||
         fprintf(f,"# ascii ppm file created by %s\n", argv[0]);
 | 
			
		||||
         fprintf(f,"%i %i\n", WIDTH, HEIGHT);
 | 
			
		||||
         fprintf(f,"# ascii ppm file created by osdemo.c\n");
 | 
			
		||||
         fprintf(f,"%i %i\n", width, height);
 | 
			
		||||
         fprintf(f,"255\n");
 | 
			
		||||
         for (y=HEIGHT-1; y>=0; y--) {
 | 
			
		||||
            for (x=0; x<WIDTH; x++) {
 | 
			
		||||
               i = (y*WIDTH + x) * 4;
 | 
			
		||||
         for (y=height-1; y>=0; y--) {
 | 
			
		||||
            for (x=0; x<width; x++) {
 | 
			
		||||
               i = (y*width + x) * 4;
 | 
			
		||||
               fprintf(f, " %3d %3d %3d", ptr[i], ptr[i+1], ptr[i+2]);
 | 
			
		||||
               counter++;
 | 
			
		||||
               if (counter % 5 == 0)
 | 
			
		||||
                  fprintf(f, "\n");
 | 
			
		||||
            }
 | 
			
		||||
         }
 | 
			
		||||
#endif
 | 
			
		||||
         fclose(f);
 | 
			
		||||
      }
 | 
			
		||||
      fclose(f);
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int main( int argc, char *argv[] )
 | 
			
		||||
{
 | 
			
		||||
   void *buffer;
 | 
			
		||||
   int i;
 | 
			
		||||
   char *filename = NULL;
 | 
			
		||||
 | 
			
		||||
   /* Create an RGBA-mode context */
 | 
			
		||||
#if OSMESA_MAJOR_VERSION * 100 + OSMESA_MINOR_VERSION >= 305
 | 
			
		||||
   /* specify Z, stencil, accum sizes */
 | 
			
		||||
   OSMesaContext ctx = OSMesaCreateContextExt( OSMESA_RGBA, 16, 0, 0, NULL );
 | 
			
		||||
#else
 | 
			
		||||
   OSMesaContext ctx = OSMesaCreateContext( OSMESA_RGBA, NULL );
 | 
			
		||||
#endif
 | 
			
		||||
   if (!ctx) {
 | 
			
		||||
      printf("OSMesaCreateContext failed!\n");
 | 
			
		||||
      return 0;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   for ( i=1; i<argc; i++ ) {
 | 
			
		||||
      if (argv[i][0] != '-') filename = argv[i];
 | 
			
		||||
      if (strcmp(argv[i], "-perf")==0) perf = 1;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   /* Allocate the image buffer */
 | 
			
		||||
   buffer = malloc( WIDTH * HEIGHT * 4 * sizeof(GLubyte) );
 | 
			
		||||
   if (!buffer) {
 | 
			
		||||
      printf("Alloc image buffer failed!\n");
 | 
			
		||||
      return 0;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   /* Bind the buffer to the context and make it current */
 | 
			
		||||
   if (!OSMesaMakeCurrent( ctx, buffer, GL_UNSIGNED_BYTE, WIDTH, HEIGHT )) {
 | 
			
		||||
      printf("OSMesaMakeCurrent failed!\n");
 | 
			
		||||
      return 0;
 | 
			
		||||
   }
 | 
			
		||||
     
 | 
			
		||||
 | 
			
		||||
   {
 | 
			
		||||
      int z, s, a;
 | 
			
		||||
      glGetIntegerv(GL_DEPTH_BITS, &z);
 | 
			
		||||
      glGetIntegerv(GL_STENCIL_BITS, &s);
 | 
			
		||||
      glGetIntegerv(GL_ACCUM_RED_BITS, &a);
 | 
			
		||||
      printf("Depth=%d Stencil=%d Accum=%d\n", z, s, a);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   render_image();
 | 
			
		||||
   if (perf)
 | 
			
		||||
      for(i=0; i< 1000; i++)
 | 
			
		||||
         render_image();
 | 
			
		||||
 | 
			
		||||
   if (filename != NULL) {
 | 
			
		||||
#ifdef SAVE_TARGA
 | 
			
		||||
      write_targa(filename, buffer, WIDTH, HEIGHT);
 | 
			
		||||
#else
 | 
			
		||||
      write_ppm(filename, buffer, WIDTH, HEIGHT);
 | 
			
		||||
#endif
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      printf("Specify a filename if you want to make a ppm file\n");
 | 
			
		||||
      printf("Specify a filename if you want to make an image file\n");
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   printf("all done\n");
 | 
			
		||||
 
 | 
			
		||||
@@ -1,50 +1,48 @@
 | 
			
		||||
/* $Id: paltex.c,v 1.2 1999/11/02 15:09:04 brianp Exp $ */
 | 
			
		||||
/* $Id: paltex.c,v 1.6.2.3 2002/07/22 13:45:45 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Paletted texture demo.  Written by Brian Paul.
 | 
			
		||||
 * This program is in the public domain.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: paltex.c,v $
 | 
			
		||||
 * Revision 1.2  1999/11/02 15:09:04  brianp
 | 
			
		||||
 * new texture image, cleaned-up code
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.1.1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Imported sources
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.1  1999/03/28 18:20:49  brianp
 | 
			
		||||
 * minor clean-up
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.0  1998/02/14 18:42:29  brianp
 | 
			
		||||
 * initial rev
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#ifdef _WIN32
 | 
			
		||||
#include <windows.h>
 | 
			
		||||
#endif
 | 
			
		||||
#define GL_GLEXT_LEGACY
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static float Rot = 0.0;
 | 
			
		||||
static GLboolean Anim = 1;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void Idle( void )
 | 
			
		||||
{
 | 
			
		||||
   Rot += 5.0;
 | 
			
		||||
   float t = glutGet(GLUT_ELAPSED_TIME) * 0.001;  /* in seconds */
 | 
			
		||||
   Rot = t * 360 / 4;  /* 1 rotation per 4 seconds */
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void Display( void )
 | 
			
		||||
{
 | 
			
		||||
   glClear( GL_COLOR_BUFFER_BIT );
 | 
			
		||||
   /* draw background gradient */
 | 
			
		||||
   glDisable(GL_TEXTURE_2D);
 | 
			
		||||
   glBegin(GL_POLYGON);
 | 
			
		||||
   glColor3f(1.0, 0.0, 0.2); glVertex2f(-1.5, -1.0);
 | 
			
		||||
   glColor3f(1.0, 0.0, 0.2); glVertex2f( 1.5, -1.0);
 | 
			
		||||
   glColor3f(0.0, 0.0, 1.0); glVertex2f( 1.5,  1.0);
 | 
			
		||||
   glColor3f(0.0, 0.0, 1.0); glVertex2f(-1.5,  1.0);
 | 
			
		||||
   glEnd();
 | 
			
		||||
 | 
			
		||||
   glPushMatrix();
 | 
			
		||||
   glRotatef(Rot, 0, 0, 1);
 | 
			
		||||
 | 
			
		||||
   glEnable(GL_TEXTURE_2D);
 | 
			
		||||
   glBegin(GL_POLYGON);
 | 
			
		||||
   glTexCoord2f(0, 1);  glVertex2f(-1, -0.5);
 | 
			
		||||
   glTexCoord2f(1, 1);  glVertex2f( 1, -0.5);
 | 
			
		||||
@@ -63,10 +61,9 @@ static void Reshape( int width, int height )
 | 
			
		||||
   glViewport( 0, 0, width, height );
 | 
			
		||||
   glMatrixMode( GL_PROJECTION );
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 );
 | 
			
		||||
   glOrtho( -1.5, 1.5, -1.0, 1.0, -1.0, 1.0 );
 | 
			
		||||
   glMatrixMode( GL_MODELVIEW );
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glTranslatef( 0.0, 0.0, -7.0 );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -78,6 +75,16 @@ static void Key( unsigned char key, int x, int y )
 | 
			
		||||
      case 27:
 | 
			
		||||
         exit(0);
 | 
			
		||||
         break;
 | 
			
		||||
      case 's':
 | 
			
		||||
         Rot += 0.5;
 | 
			
		||||
         break;
 | 
			
		||||
      case ' ':
 | 
			
		||||
         Anim = !Anim;
 | 
			
		||||
         if (Anim)
 | 
			
		||||
            glutIdleFunc( Idle );
 | 
			
		||||
         else
 | 
			
		||||
            glutIdleFunc( NULL );
 | 
			
		||||
         break;
 | 
			
		||||
   }
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
@@ -87,18 +94,18 @@ static void Init( void )
 | 
			
		||||
{
 | 
			
		||||
#define HEIGHT 8
 | 
			
		||||
#define WIDTH 32
 | 
			
		||||
   static char texture[HEIGHT][WIDTH] = {
 | 
			
		||||
         "                                ",
 | 
			
		||||
         "    MMM    EEEE   SSS    AAA    ",
 | 
			
		||||
         "   M M M  E      S   S  A   A   ",
 | 
			
		||||
         "   M M M  EEEE    SS    A   A   ",
 | 
			
		||||
         "   M M M  E         SS  AAAAA   ",
 | 
			
		||||
         "   M   M  E      S   S  A   A   ",
 | 
			
		||||
         "   M   M   EEEE   SSS   A   A   ",
 | 
			
		||||
         "                                "
 | 
			
		||||
   /* 257 = HEIGHT * WIDTH + 1 (for trailing '\0') */
 | 
			
		||||
   static char texture[257] = {"\
 | 
			
		||||
                                \
 | 
			
		||||
    MMM    EEEE   SSS    AAA    \
 | 
			
		||||
   M M M  E      S   S  A   A   \
 | 
			
		||||
   M M M  EEEE    SS    A   A   \
 | 
			
		||||
   M M M  E         SS  AAAAA   \
 | 
			
		||||
   M   M  E      S   S  A   A   \
 | 
			
		||||
   M   M   EEEE   SSS   A   A   \
 | 
			
		||||
                                "
 | 
			
		||||
      };
 | 
			
		||||
   GLubyte table[256][4];
 | 
			
		||||
   int i;
 | 
			
		||||
 | 
			
		||||
   if (!glutExtensionSupported("GL_EXT_paletted_texture")) {
 | 
			
		||||
      printf("Sorry, GL_EXT_paletted_texture not supported\n");
 | 
			
		||||
@@ -106,26 +113,99 @@ static void Init( void )
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   /* load the color table for each texel-index */
 | 
			
		||||
   table[' '][0] = 50;
 | 
			
		||||
   table[' '][1] = 50;
 | 
			
		||||
   table[' '][2] = 50;
 | 
			
		||||
   table[' '][3] = 50;
 | 
			
		||||
   memset(table, 0, 256*4);
 | 
			
		||||
   table[' '][0] = 255;
 | 
			
		||||
   table[' '][1] = 255;
 | 
			
		||||
   table[' '][2] = 255;
 | 
			
		||||
   table[' '][3] = 64;
 | 
			
		||||
   table['M'][0] = 255;
 | 
			
		||||
   table['M'][1] = 0;
 | 
			
		||||
   table['M'][2] = 0;
 | 
			
		||||
   table['M'][3] = 0;
 | 
			
		||||
   table['M'][3] = 255;
 | 
			
		||||
   table['E'][0] = 0;
 | 
			
		||||
   table['E'][1] = 255;
 | 
			
		||||
   table['E'][2] = 0;
 | 
			
		||||
   table['E'][3] = 0;
 | 
			
		||||
   table['S'][0] = 40;
 | 
			
		||||
   table['S'][1] = 40;
 | 
			
		||||
   table['E'][3] = 255;
 | 
			
		||||
   table['S'][0] = 0;
 | 
			
		||||
   table['S'][1] = 0;
 | 
			
		||||
   table['S'][2] = 255;
 | 
			
		||||
   table['S'][3] = 0;
 | 
			
		||||
   table['S'][3] = 255;
 | 
			
		||||
   table['A'][0] = 255;
 | 
			
		||||
   table['A'][1] = 255;
 | 
			
		||||
   table['A'][2] = 0;
 | 
			
		||||
   table['A'][3] = 0;
 | 
			
		||||
   table['A'][3] = 255;
 | 
			
		||||
 | 
			
		||||
#ifdef GL_EXT_paletted_texture
 | 
			
		||||
 | 
			
		||||
#if defined(GL_EXT_shared_texture_palette) && defined(USE_SHARED_PALETTE)
 | 
			
		||||
   printf("Using shared palette\n");
 | 
			
		||||
   glColorTableEXT(GL_SHARED_TEXTURE_PALETTE_EXT,    /* target */
 | 
			
		||||
                   GL_RGBA,          /* internal format */
 | 
			
		||||
                   256,              /* table size */
 | 
			
		||||
                   GL_RGBA,          /* table format */
 | 
			
		||||
                   GL_UNSIGNED_BYTE, /* table type */
 | 
			
		||||
                   table);           /* the color table */
 | 
			
		||||
   glEnable(GL_SHARED_TEXTURE_PALETTE_EXT);
 | 
			
		||||
#else
 | 
			
		||||
   glColorTableEXT(GL_TEXTURE_2D,    /* target */
 | 
			
		||||
                   GL_RGBA,          /* internal format */
 | 
			
		||||
                   256,              /* table size */
 | 
			
		||||
                   GL_RGBA,          /* table format */
 | 
			
		||||
                   GL_UNSIGNED_BYTE, /* table type */
 | 
			
		||||
                   table);           /* the color table */
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   glTexImage2D(GL_TEXTURE_2D,       /* target */
 | 
			
		||||
                0,                   /* level */
 | 
			
		||||
                GL_COLOR_INDEX8_EXT, /* internal format */
 | 
			
		||||
                WIDTH, HEIGHT,       /* width, height */
 | 
			
		||||
                0,                   /* border */
 | 
			
		||||
                GL_COLOR_INDEX,      /* texture format */
 | 
			
		||||
                GL_UNSIGNED_BYTE,    /* texture type */
 | 
			
		||||
                texture);            /* the texture */
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
 | 
			
		||||
   glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
 | 
			
		||||
   glEnable(GL_TEXTURE_2D);
 | 
			
		||||
 | 
			
		||||
   glEnable(GL_BLEND);
 | 
			
		||||
   glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 | 
			
		||||
#undef HEIGHT
 | 
			
		||||
#undef WIDTH
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Color ramp test
 | 
			
		||||
 */
 | 
			
		||||
static void Init2( void )
 | 
			
		||||
{
 | 
			
		||||
#define HEIGHT 32
 | 
			
		||||
#define WIDTH 256
 | 
			
		||||
   static char texture[HEIGHT][WIDTH];
 | 
			
		||||
   GLubyte table[256][4];
 | 
			
		||||
   int i, j;
 | 
			
		||||
 | 
			
		||||
   if (!glutExtensionSupported("GL_EXT_paletted_texture")) {
 | 
			
		||||
      printf("Sorry, GL_EXT_paletted_texture not supported\n");
 | 
			
		||||
      exit(0);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   for (j = 0; j < HEIGHT; j++) {
 | 
			
		||||
      for (i = 0; i < WIDTH; i++) {
 | 
			
		||||
         texture[j][i] = i;
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   for (i = 0; i < 255; i++) {
 | 
			
		||||
      table[i][0] = i;
 | 
			
		||||
      table[i][1] = 0;
 | 
			
		||||
      table[i][2] = 0;
 | 
			
		||||
      table[i][3] = 255;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
#ifdef GL_EXT_paletted_texture
 | 
			
		||||
 | 
			
		||||
@@ -161,6 +241,9 @@ static void Init( void )
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
 | 
			
		||||
   glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
 | 
			
		||||
   glEnable(GL_TEXTURE_2D);
 | 
			
		||||
 | 
			
		||||
   glEnable(GL_BLEND);
 | 
			
		||||
   glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -168,7 +251,7 @@ int main( int argc, char *argv[] )
 | 
			
		||||
{
 | 
			
		||||
   glutInit( &argc, argv );
 | 
			
		||||
   glutInitWindowPosition( 0, 0 );
 | 
			
		||||
   glutInitWindowSize( 400, 400 );
 | 
			
		||||
   glutInitWindowSize( 400, 300 );
 | 
			
		||||
 | 
			
		||||
   glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
 | 
			
		||||
 | 
			
		||||
@@ -179,7 +262,8 @@ int main( int argc, char *argv[] )
 | 
			
		||||
   glutReshapeFunc( Reshape );
 | 
			
		||||
   glutKeyboardFunc( Key );
 | 
			
		||||
   glutDisplayFunc( Display );
 | 
			
		||||
   glutIdleFunc( Idle );
 | 
			
		||||
   if (Anim)
 | 
			
		||||
      glutIdleFunc( Idle );
 | 
			
		||||
 | 
			
		||||
   glutMainLoop();
 | 
			
		||||
   return 0;
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										219
									
								
								progs/demos/particles.cxx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										219
									
								
								progs/demos/particles.cxx
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,219 @@
 | 
			
		||||
/*
 | 
			
		||||
 * This program is under the GNU GPL.
 | 
			
		||||
 * Use at your own risk.
 | 
			
		||||
 *
 | 
			
		||||
 * written by David Bucciarelli (humanware@plus.it)
 | 
			
		||||
 *            Humanware s.r.l.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
 | 
			
		||||
#include "particles.h"
 | 
			
		||||
 | 
			
		||||
#define vinit(a,i,j,k) {\
 | 
			
		||||
  (a)[0]=i;\
 | 
			
		||||
  (a)[1]=j;\
 | 
			
		||||
  (a)[2]=k;\
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#define vadds(a,dt,b) {\
 | 
			
		||||
  (a)[0]+=(dt)*(b)[0];\
 | 
			
		||||
  (a)[1]+=(dt)*(b)[1];\
 | 
			
		||||
  (a)[2]+=(dt)*(b)[2];\
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#define vequ(a,b) {\
 | 
			
		||||
  (a)[0]=(b)[0];\
 | 
			
		||||
  (a)[1]=(b)[1];\
 | 
			
		||||
  (a)[2]=(b)[2];\
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#define vinter(a,dt,b,c) {\
 | 
			
		||||
  (a)[0]=(dt)*(b)[0]+(1.0-dt)*(c)[0];\
 | 
			
		||||
  (a)[1]=(dt)*(b)[1]+(1.0-dt)*(c)[1];\
 | 
			
		||||
  (a)[2]=(dt)*(b)[2]+(1.0-dt)*(c)[2];\
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#define clamp(a)        ((a) < 0.0 ? 0.0 : ((a) < 1.0 ? (a) : 1.0))
 | 
			
		||||
 | 
			
		||||
#define vclamp(v) {\
 | 
			
		||||
  (v)[0]=clamp((v)[0]);\
 | 
			
		||||
  (v)[1]=clamp((v)[1]);\
 | 
			
		||||
  (v)[2]=clamp((v)[2]);\
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
float rainParticle::min[3];
 | 
			
		||||
float rainParticle::max[3];
 | 
			
		||||
float rainParticle::partLength=0.2f;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static float vrnd(void)
 | 
			
		||||
{
 | 
			
		||||
  return(((float)rand())/RAND_MAX);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
particle::particle()
 | 
			
		||||
{
 | 
			
		||||
  age=0.0f;
 | 
			
		||||
 | 
			
		||||
  vinit(acc,0.0f,0.0f,0.0f);
 | 
			
		||||
  vinit(vel,0.0f,0.0f,0.0f);
 | 
			
		||||
  vinit(pos,0.0f,0.0f,0.0f);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void particle::elapsedTime(float dt)
 | 
			
		||||
{
 | 
			
		||||
  age+=dt;
 | 
			
		||||
 | 
			
		||||
  vadds(vel,dt,acc);
 | 
			
		||||
 | 
			
		||||
  vadds(pos,dt,vel);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/////////////////////////////////////////
 | 
			
		||||
// Particle System
 | 
			
		||||
/////////////////////////////////////////
 | 
			
		||||
 | 
			
		||||
particleSystem::particleSystem()
 | 
			
		||||
{
 | 
			
		||||
  t=0.0f;
 | 
			
		||||
 | 
			
		||||
  part=NULL;
 | 
			
		||||
 | 
			
		||||
  particleNum=0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
particleSystem::~particleSystem()
 | 
			
		||||
{
 | 
			
		||||
  if(part)
 | 
			
		||||
    free(part);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void particleSystem::addParticle(particle *p)
 | 
			
		||||
{
 | 
			
		||||
  if(!part) {
 | 
			
		||||
    part=(particle **)calloc(1,sizeof(particle *));
 | 
			
		||||
    part[0]=p;
 | 
			
		||||
    particleNum=1;
 | 
			
		||||
  } else {
 | 
			
		||||
    particleNum++;
 | 
			
		||||
    part=(particle **)realloc(part,sizeof(particle *)*particleNum);
 | 
			
		||||
    part[particleNum-1]=p;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void particleSystem::reset(void)
 | 
			
		||||
{
 | 
			
		||||
  if(part)
 | 
			
		||||
    free(part);
 | 
			
		||||
 | 
			
		||||
  t=0.0f;
 | 
			
		||||
 | 
			
		||||
  part=NULL;
 | 
			
		||||
 | 
			
		||||
  particleNum=0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void particleSystem::draw(void)
 | 
			
		||||
{
 | 
			
		||||
  if(!part)
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  part[0]->beginDraw();
 | 
			
		||||
  for(unsigned int i=0;i<particleNum;i++)
 | 
			
		||||
    part[i]->draw();
 | 
			
		||||
  part[0]->endDraw();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void particleSystem::addTime(float dt)
 | 
			
		||||
{
 | 
			
		||||
  if(!part)
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  for(unsigned int i=0;i<particleNum;i++) {
 | 
			
		||||
    part[i]->elapsedTime(dt);
 | 
			
		||||
    part[i]->checkAge();
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/////////////////////////////////////////
 | 
			
		||||
// Rain
 | 
			
		||||
/////////////////////////////////////////
 | 
			
		||||
 | 
			
		||||
void rainParticle::init(void)
 | 
			
		||||
{
 | 
			
		||||
  age=0.0f;
 | 
			
		||||
 | 
			
		||||
  acc[0]=0.0f;
 | 
			
		||||
  acc[1]=-0.98f;
 | 
			
		||||
  acc[2]=0.0f;
 | 
			
		||||
 | 
			
		||||
  vel[0]=0.0f;
 | 
			
		||||
  vel[1]=0.0f;
 | 
			
		||||
  vel[2]=0.0f;
 | 
			
		||||
 | 
			
		||||
  oldpos[0]=pos[0]=min[0]+(max[0]-min[0])*vrnd();
 | 
			
		||||
  oldpos[1]=pos[1]=max[1]+0.2f*max[1]*vrnd();
 | 
			
		||||
  oldpos[2]=pos[2]=min[2]+(max[2]-min[2])*vrnd();
 | 
			
		||||
 | 
			
		||||
  vadds(oldpos,-partLength,vel);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
rainParticle::rainParticle()
 | 
			
		||||
{ 
 | 
			
		||||
  init();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void rainParticle::setRainingArea(float minx, float miny, float minz,
 | 
			
		||||
				  float maxx, float maxy, float maxz)
 | 
			
		||||
{
 | 
			
		||||
  vinit(min,minx,miny,minz);
 | 
			
		||||
  vinit(max,maxx,maxy,maxz);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void rainParticle::setLength(float l)
 | 
			
		||||
{
 | 
			
		||||
  partLength=l;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void rainParticle::draw(void)
 | 
			
		||||
{
 | 
			
		||||
  glColor4f(0.7f,0.95f,1.0f,0.0f);
 | 
			
		||||
  glVertex3fv(oldpos);
 | 
			
		||||
 | 
			
		||||
  glColor4f(0.3f,0.7f,1.0f,1.0f);
 | 
			
		||||
  glVertex3fv(pos);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void rainParticle::checkAge(void)
 | 
			
		||||
{
 | 
			
		||||
  if(pos[1]<min[1])
 | 
			
		||||
    init();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void rainParticle::elapsedTime(float dt)
 | 
			
		||||
{
 | 
			
		||||
  particle::elapsedTime(dt);
 | 
			
		||||
 | 
			
		||||
  if(pos[0]<min[0])
 | 
			
		||||
    pos[0]=max[0]-(min[0]-pos[0]);
 | 
			
		||||
  if(pos[2]<min[2])
 | 
			
		||||
    pos[2]=max[2]-(min[2]-pos[2]);
 | 
			
		||||
 | 
			
		||||
  if(pos[0]>max[0])
 | 
			
		||||
    pos[0]=min[0]+(pos[0]-max[0]);
 | 
			
		||||
  if(pos[2]>max[2])
 | 
			
		||||
    pos[2]=min[2]+(pos[2]-max[2]);
 | 
			
		||||
 | 
			
		||||
  vequ(oldpos,pos);
 | 
			
		||||
  vadds(oldpos,-partLength,vel);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void rainParticle::randomHeight(void)
 | 
			
		||||
{
 | 
			
		||||
  pos[1]=(max[1]-min[1])*vrnd()+min[1];
 | 
			
		||||
 | 
			
		||||
  oldpos[1]=pos[1]-partLength*vel[1];
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										81
									
								
								progs/demos/particles.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										81
									
								
								progs/demos/particles.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,81 @@
 | 
			
		||||
/*
 | 
			
		||||
 * This program is under the GNU GPL.
 | 
			
		||||
 * Use at your own risk.
 | 
			
		||||
 *
 | 
			
		||||
 * written by David Bucciarelli (humanware@plus.it)
 | 
			
		||||
 *            Humanware s.r.l.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef PARTICLES_H
 | 
			
		||||
#define PARTICLES_H
 | 
			
		||||
 | 
			
		||||
#include <GL/gl.h>
 | 
			
		||||
 | 
			
		||||
class particle {
 | 
			
		||||
 protected:
 | 
			
		||||
  float age;         // in seconds
 | 
			
		||||
  float acc[3];
 | 
			
		||||
  float vel[3];
 | 
			
		||||
  float pos[3];
 | 
			
		||||
 | 
			
		||||
 public:
 | 
			
		||||
  particle();
 | 
			
		||||
  virtual ~particle() {};
 | 
			
		||||
 | 
			
		||||
  virtual void beginDraw(void) {};
 | 
			
		||||
  virtual void draw(void)=0;
 | 
			
		||||
  virtual void endDraw(void) {};
 | 
			
		||||
 | 
			
		||||
  virtual void elapsedTime(float);
 | 
			
		||||
  virtual void checkAge(void) {};
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class particleSystem {
 | 
			
		||||
 protected:
 | 
			
		||||
  particle **part;
 | 
			
		||||
 | 
			
		||||
  float t;
 | 
			
		||||
 | 
			
		||||
  unsigned long particleNum;
 | 
			
		||||
 public:
 | 
			
		||||
  particleSystem();
 | 
			
		||||
  ~particleSystem();
 | 
			
		||||
 | 
			
		||||
  void addParticle(particle *);
 | 
			
		||||
 | 
			
		||||
  void reset(void);
 | 
			
		||||
 | 
			
		||||
  void draw(void);
 | 
			
		||||
 | 
			
		||||
  void addTime(float);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class rainParticle : public particle {
 | 
			
		||||
 protected:
 | 
			
		||||
  static float min[3];
 | 
			
		||||
  static float max[3];
 | 
			
		||||
  static float partLength;
 | 
			
		||||
 | 
			
		||||
  float oldpos[3];
 | 
			
		||||
 | 
			
		||||
  void init(void);
 | 
			
		||||
 public:
 | 
			
		||||
  rainParticle();
 | 
			
		||||
 | 
			
		||||
  static void setRainingArea(float, float, float,
 | 
			
		||||
			     float, float, float);
 | 
			
		||||
  static void setLength(float);
 | 
			
		||||
  static float getLength(void) { return partLength; };
 | 
			
		||||
 | 
			
		||||
  void beginDraw(void) { glBegin(GL_LINES); };
 | 
			
		||||
  void draw(void);
 | 
			
		||||
  void endDraw(void) { glEnd(); };
 | 
			
		||||
 | 
			
		||||
  void elapsedTime(float);
 | 
			
		||||
 | 
			
		||||
  void checkAge(void);
 | 
			
		||||
 | 
			
		||||
  void randomHeight(void);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
							
								
								
									
										210
									
								
								progs/demos/pixeltex.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										210
									
								
								progs/demos/pixeltex.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,210 @@
 | 
			
		||||
/*
 | 
			
		||||
 * GL_SGIS_pixel_texture demo
 | 
			
		||||
 *
 | 
			
		||||
 * Brian Paul
 | 
			
		||||
 * 6 Apr 2000
 | 
			
		||||
 *
 | 
			
		||||
 * Copyright (C) 2000  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * 
 | 
			
		||||
 * Permission is hereby granted, free of charge, to any person obtaining a
 | 
			
		||||
 * copy of this software and associated documentation files (the "Software"),
 | 
			
		||||
 * to deal in the Software without restriction, including without limitation
 | 
			
		||||
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 | 
			
		||||
 * and/or sell copies of the Software, and to permit persons to whom the
 | 
			
		||||
 * Software is furnished to do so, subject to the following conditions:
 | 
			
		||||
 * 
 | 
			
		||||
 * The above copyright notice and this permission notice shall be included
 | 
			
		||||
 * in all copies or substantial portions of the Software.
 | 
			
		||||
 * 
 | 
			
		||||
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 | 
			
		||||
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
			
		||||
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 | 
			
		||||
 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
 | 
			
		||||
 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 | 
			
		||||
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * How this works:
 | 
			
		||||
 * 1. We load the image into a 2D texture.
 | 
			
		||||
 * 2. We generate a sequence of RGB images in which the R component
 | 
			
		||||
 *    is really the S texture coordinate and the G component is really
 | 
			
		||||
 *    the T texture coordinate.
 | 
			
		||||
 *    By warping the mapping from R to S and G to T we can get non-linear
 | 
			
		||||
 *    distortions.
 | 
			
		||||
 * 3. Draw the warped image (a 2-D warping function) with pixel texgen
 | 
			
		||||
 *    enabled.
 | 
			
		||||
 * 4. Loop over the warped images to animate.
 | 
			
		||||
 *
 | 
			
		||||
 * The pixel texgen extension can also be used to do color-space
 | 
			
		||||
 * conversions.  For example, we could convert YCR to RGB with a
 | 
			
		||||
 * 3D texture map which takes YCR as the S,T,R texture coordinate and
 | 
			
		||||
 * returns RGB texel values.
 | 
			
		||||
 *
 | 
			
		||||
 * You can use this extension in (at least) two ways:
 | 
			
		||||
 * 1. glDrawPixels w/ color space conversion/warping
 | 
			
		||||
 * 2. glDrawPixels to spatially warp another image in texture memory
 | 
			
		||||
 *
 | 
			
		||||
 * We're basically using glDrawPixels to draw a texture coordinate image.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
#include <GL/glext.h>
 | 
			
		||||
#include "readtex.c"   /* I know, this is a hack. */
 | 
			
		||||
 | 
			
		||||
#define TEXTURE_FILE "../images/girl.rgb"
 | 
			
		||||
 | 
			
		||||
static int ImgWidth = 300, ImgHeight = 300;
 | 
			
		||||
#define FRAMES 20
 | 
			
		||||
static GLubyte *ImgData[FRAMES];
 | 
			
		||||
static GLint Frame = 0;
 | 
			
		||||
 | 
			
		||||
static GLboolean TextureFlag = GL_TRUE;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void Display( void )
 | 
			
		||||
{
 | 
			
		||||
   glClear( GL_COLOR_BUFFER_BIT );
 | 
			
		||||
 | 
			
		||||
   if (TextureFlag) {
 | 
			
		||||
      glEnable(GL_PIXEL_TEXTURE_SGIS);
 | 
			
		||||
      glEnable(GL_TEXTURE_2D);
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      glDisable(GL_PIXEL_TEXTURE_SGIS);
 | 
			
		||||
      glDisable(GL_TEXTURE_2D);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glColor3f(1, 1, 1);
 | 
			
		||||
   glRasterPos2f(10, 10);
 | 
			
		||||
   glDrawPixels(ImgWidth, ImgHeight, GL_RGB, GL_UNSIGNED_BYTE, ImgData[Frame]);
 | 
			
		||||
 | 
			
		||||
   glutSwapBuffers();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void Reshape( int width, int height )
 | 
			
		||||
{
 | 
			
		||||
   glViewport( 0, 0, width, height );
 | 
			
		||||
   glMatrixMode( GL_PROJECTION );
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glOrtho(0, width, 0, height, -1, 1);
 | 
			
		||||
   glMatrixMode( GL_MODELVIEW );
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void Key( unsigned char key, int x, int y )
 | 
			
		||||
{
 | 
			
		||||
   (void) x;
 | 
			
		||||
   (void) y;
 | 
			
		||||
   switch (key) {
 | 
			
		||||
      case ' ':
 | 
			
		||||
         TextureFlag = !TextureFlag;
 | 
			
		||||
         break;
 | 
			
		||||
      case 27:
 | 
			
		||||
         exit(0);
 | 
			
		||||
         break;
 | 
			
		||||
   }
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void Idle(void)
 | 
			
		||||
{
 | 
			
		||||
   Frame++;
 | 
			
		||||
   if (Frame >= FRAMES)
 | 
			
		||||
      Frame = 0;
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static GLubyte warp(GLfloat s, int frame)
 | 
			
		||||
{
 | 
			
		||||
   static const GLfloat pi = 3.14159265;
 | 
			
		||||
   static int halfFrame = FRAMES / 2;
 | 
			
		||||
   GLfloat y, weight, v;
 | 
			
		||||
   if (frame >= halfFrame)
 | 
			
		||||
      frame = halfFrame - (frame - halfFrame);
 | 
			
		||||
   y = sin(s * pi);
 | 
			
		||||
   weight = (float) frame / (FRAMES-1);
 | 
			
		||||
   v = y * (0.8 * weight + 0.2);
 | 
			
		||||
   return (GLint) (v * 255.0F);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void InitImage(void)
 | 
			
		||||
{
 | 
			
		||||
   int i, j, frame;
 | 
			
		||||
   for (frame = 0; frame < FRAMES; frame++) {
 | 
			
		||||
      ImgData[frame] = (GLubyte *) malloc(ImgWidth * ImgHeight * 3);
 | 
			
		||||
      for (i = 0; i < ImgHeight; i++) {
 | 
			
		||||
         for (j = 0; j < ImgWidth; j++) {
 | 
			
		||||
            GLubyte *pixel = ImgData[frame] + (i * ImgWidth + j) * 3;
 | 
			
		||||
            pixel[0] = warp((float) j / (ImgWidth - 0), frame);
 | 
			
		||||
            pixel[1] = warp((float) i / (ImgHeight - 0), frame);
 | 
			
		||||
            pixel[2] = 0.0;
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void Init( int argc, char *argv[] )
 | 
			
		||||
{
 | 
			
		||||
   const char *exten = (const char *) glGetString(GL_EXTENSIONS);
 | 
			
		||||
   if (!strstr(exten, "GL_SGIS_pixel_texture")) {
 | 
			
		||||
      printf("Sorry, GL_SGIS_pixel_texture not supported by this renderer.\n");
 | 
			
		||||
      exit(1);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   /* linear filtering looks nicer, but it's slower, since it's in software */
 | 
			
		||||
#if 1
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 | 
			
		||||
#else
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
 | 
			
		||||
 | 
			
		||||
   glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
 | 
			
		||||
 | 
			
		||||
   if (!LoadRGBMipmaps(TEXTURE_FILE, GL_RGB)) {
 | 
			
		||||
      printf("Error: couldn't load texture image\n");
 | 
			
		||||
      exit(1);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glClearColor(0.3, 0.3, 0.4, 1.0);
 | 
			
		||||
 | 
			
		||||
   InitImage();
 | 
			
		||||
 | 
			
		||||
   printf("Hit SPACE to toggle pixel texgen\n");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int main( int argc, char *argv[] )
 | 
			
		||||
{
 | 
			
		||||
   glutInit( &argc, argv );
 | 
			
		||||
   glutInitWindowSize( 330, 330 );
 | 
			
		||||
   glutInitWindowPosition( 0, 0 );
 | 
			
		||||
   glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
 | 
			
		||||
   glutCreateWindow(argv[0] );
 | 
			
		||||
 | 
			
		||||
   Init( argc, argv );
 | 
			
		||||
 | 
			
		||||
   glutKeyboardFunc( Key );
 | 
			
		||||
   glutReshapeFunc( Reshape );
 | 
			
		||||
   glutDisplayFunc( Display );
 | 
			
		||||
   glutIdleFunc( Idle );
 | 
			
		||||
 | 
			
		||||
   glutMainLoop();
 | 
			
		||||
   return 0;
 | 
			
		||||
}
 | 
			
		||||
@@ -13,8 +13,18 @@
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: pointblast.c,v $
 | 
			
		||||
 * Revision 1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Initial revision
 | 
			
		||||
 * Revision 1.2.6.1  2002/04/15 22:14:09  kschultz
 | 
			
		||||
 * Build demos/samples correctly on Windows (Robert Bergkvist) to sync up
 | 
			
		||||
 * with the main branch.  (I should have done this for 4.0.2)
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.3  2002/01/16 00:48:43  kschultz
 | 
			
		||||
 * Demo updates for Windows (Robert Bergkvist)
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.2  2000/06/27 17:04:43  brianp
 | 
			
		||||
 * fixed compiler warnings
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.1.1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Imported sources
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.3  1998/07/26 01:24:27  brianp
 | 
			
		||||
 * removed include of gl.h
 | 
			
		||||
@@ -35,6 +45,10 @@
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <math.h>       /* for cos(), sin(), and sqrt() */
 | 
			
		||||
#ifdef _WIN32
 | 
			
		||||
#include <windows.h>
 | 
			
		||||
#endif
 | 
			
		||||
#define GL_GLEXT_LEGACY
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
 | 
			
		||||
/* Some <math.h> files do not define M_PI... */
 | 
			
		||||
@@ -100,7 +114,7 @@ static float float_rand(void) { return rand() / (float) RAND_MAX; }
 | 
			
		||||
/* Modeling units of ground extent in each X and Z direction. */
 | 
			
		||||
#define EDGE 12
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
static void
 | 
			
		||||
makePointList(void)
 | 
			
		||||
{
 | 
			
		||||
  float angle, velocity, direction;
 | 
			
		||||
@@ -124,7 +138,7 @@ makePointList(void)
 | 
			
		||||
  theTime = 0.0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
static void
 | 
			
		||||
updatePointList(void)
 | 
			
		||||
{
 | 
			
		||||
  float distance;
 | 
			
		||||
@@ -167,7 +181,7 @@ updatePointList(void)
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
static void
 | 
			
		||||
idle(void)
 | 
			
		||||
{
 | 
			
		||||
  updatePointList();
 | 
			
		||||
@@ -178,7 +192,7 @@ idle(void)
 | 
			
		||||
  glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
static void
 | 
			
		||||
visible(int vis)
 | 
			
		||||
{
 | 
			
		||||
  if (vis == GLUT_VISIBLE) {
 | 
			
		||||
@@ -190,7 +204,7 @@ visible(int vis)
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
static void
 | 
			
		||||
recalcModelView(void)
 | 
			
		||||
{
 | 
			
		||||
  glPopMatrix();
 | 
			
		||||
@@ -199,7 +213,7 @@ recalcModelView(void)
 | 
			
		||||
  newModel = 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
static void
 | 
			
		||||
redraw(void)
 | 
			
		||||
{
 | 
			
		||||
  int i;
 | 
			
		||||
@@ -247,7 +261,7 @@ redraw(void)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* ARGSUSED2 */
 | 
			
		||||
void
 | 
			
		||||
static void
 | 
			
		||||
mouse(int button, int state, int x, int y)
 | 
			
		||||
{
 | 
			
		||||
  /* Scene can be spun around Y axis using left
 | 
			
		||||
@@ -262,7 +276,7 @@ mouse(int button, int state, int x, int y)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* ARGSUSED1 */
 | 
			
		||||
void
 | 
			
		||||
static void
 | 
			
		||||
mouseMotion(int x, int y)
 | 
			
		||||
{
 | 
			
		||||
  if (moving) {
 | 
			
		||||
@@ -273,7 +287,7 @@ mouseMotion(int x, int y)
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
static void
 | 
			
		||||
menu(int option)
 | 
			
		||||
{
 | 
			
		||||
  switch (option) {
 | 
			
		||||
@@ -347,7 +361,7 @@ menu(int option)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* ARGSUSED1 */
 | 
			
		||||
void
 | 
			
		||||
static void
 | 
			
		||||
key(unsigned char c, int x, int y)
 | 
			
		||||
{
 | 
			
		||||
  switch (c) {
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										394
									
								
								progs/demos/rain.cxx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										394
									
								
								progs/demos/rain.cxx
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,394 @@
 | 
			
		||||
/*
 | 
			
		||||
 * This program is under the GNU GPL.
 | 
			
		||||
 * Use at your own risk.
 | 
			
		||||
 *
 | 
			
		||||
 * written by David Bucciarelli (humanware@plus.it)
 | 
			
		||||
 *            Humanware s.r.l.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <time.h>
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
#ifndef M_PI
 | 
			
		||||
#define M_PI 3.14159265
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include "particles.h"
 | 
			
		||||
extern "C" {
 | 
			
		||||
#include "readtex.h"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#ifdef _WIN32
 | 
			
		||||
#include <windows.h>
 | 
			
		||||
#include <mmsystem.h>
 | 
			
		||||
#include "particles.cxx"
 | 
			
		||||
#include "readtex.c"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef XMESA
 | 
			
		||||
#include "GL/xmesa.h"
 | 
			
		||||
static int fullscreen=1;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
static int WIDTH=640;
 | 
			
		||||
static int HEIGHT=480;
 | 
			
		||||
static int NUMPART=7500;
 | 
			
		||||
 | 
			
		||||
#define FRAME 50
 | 
			
		||||
 | 
			
		||||
static float fogcolor[4]={1.0,1.0,1.0,1.0};
 | 
			
		||||
 | 
			
		||||
#define DIMP 40.0
 | 
			
		||||
#define DIMTP 32.0
 | 
			
		||||
 | 
			
		||||
static float q[4][3]={
 | 
			
		||||
  {-DIMP,0.0,-DIMP},
 | 
			
		||||
  {DIMP,0.0,-DIMP},
 | 
			
		||||
  {DIMP,0.0,DIMP},
 | 
			
		||||
  {-DIMP,0.0,DIMP}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
static float qt[4][2]={
 | 
			
		||||
  {-DIMTP,-DIMTP},
 | 
			
		||||
  {DIMTP,-DIMTP},
 | 
			
		||||
  {DIMTP,DIMTP},
 | 
			
		||||
  {-DIMTP,DIMTP}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
static int win=0;
 | 
			
		||||
 | 
			
		||||
static int fog=1;
 | 
			
		||||
static int help=1;
 | 
			
		||||
 | 
			
		||||
static GLuint groundid;
 | 
			
		||||
 | 
			
		||||
static float obs[3]={2.0,1.0,0.0};
 | 
			
		||||
static float dir[3];
 | 
			
		||||
static float v=0.0;
 | 
			
		||||
static float alpha=-90.0;
 | 
			
		||||
static float beta=90.0;
 | 
			
		||||
 | 
			
		||||
static particleSystem *ps;
 | 
			
		||||
 | 
			
		||||
static float gettime()
 | 
			
		||||
{
 | 
			
		||||
  static clock_t told=0;
 | 
			
		||||
  clock_t tnew,ris;
 | 
			
		||||
 | 
			
		||||
  tnew=clock();
 | 
			
		||||
 | 
			
		||||
  ris=tnew-told;
 | 
			
		||||
 | 
			
		||||
  told=tnew;
 | 
			
		||||
 | 
			
		||||
  return(ris/(float)CLOCKS_PER_SEC);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static float gettimerain()
 | 
			
		||||
{
 | 
			
		||||
  static clock_t told=0;
 | 
			
		||||
  clock_t tnew,ris;
 | 
			
		||||
 | 
			
		||||
  tnew=clock();
 | 
			
		||||
 | 
			
		||||
  ris=tnew-told;
 | 
			
		||||
 | 
			
		||||
  told=tnew;
 | 
			
		||||
 | 
			
		||||
  return(ris/(float)CLOCKS_PER_SEC);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void calcposobs(void)
 | 
			
		||||
{
 | 
			
		||||
  dir[0]=sin(alpha*M_PI/180.0);
 | 
			
		||||
  dir[2]=cos(alpha*M_PI/180.0)*sin(beta*M_PI/180.0);
 | 
			
		||||
  dir[1]=cos(beta*M_PI/180.0);
 | 
			
		||||
 | 
			
		||||
  obs[0]+=v*dir[0];
 | 
			
		||||
  obs[1]+=v*dir[1];
 | 
			
		||||
  obs[2]+=v*dir[2];
 | 
			
		||||
 | 
			
		||||
  rainParticle::setRainingArea(obs[0]-7.0f,-0.2f,obs[2]-7.0f,obs[0]+7.0f,8.0f,obs[2]+7.0f);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void printstring(void *font, char *string)
 | 
			
		||||
{
 | 
			
		||||
  int len,i;
 | 
			
		||||
 | 
			
		||||
  len=(int)strlen(string);
 | 
			
		||||
  for(i=0;i<len;i++)
 | 
			
		||||
    glutBitmapCharacter(font,string[i]);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void reshape(int width, int height)
 | 
			
		||||
{
 | 
			
		||||
  WIDTH=width;
 | 
			
		||||
  HEIGHT=height;
 | 
			
		||||
  glViewport(0,0,(GLint)width,(GLint)height);
 | 
			
		||||
  glMatrixMode(GL_PROJECTION);
 | 
			
		||||
  glLoadIdentity();
 | 
			
		||||
  gluPerspective(70.0,width/(float)height,0.1,30.0);
 | 
			
		||||
 | 
			
		||||
  glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void printhelp(void)
 | 
			
		||||
{
 | 
			
		||||
  glEnable(GL_BLEND);
 | 
			
		||||
  glColor4f(0.0,0.0,0.0,0.5);
 | 
			
		||||
  glRecti(40,40,600,440);
 | 
			
		||||
  glDisable(GL_BLEND);
 | 
			
		||||
 | 
			
		||||
  glColor3f(1.0,0.0,0.0);
 | 
			
		||||
  glRasterPos2i(300,420);
 | 
			
		||||
  printstring(GLUT_BITMAP_TIMES_ROMAN_24,"Help");
 | 
			
		||||
 | 
			
		||||
  glRasterPos2i(60,390);
 | 
			
		||||
  printstring(GLUT_BITMAP_TIMES_ROMAN_24,"h - Togle Help");
 | 
			
		||||
 | 
			
		||||
  glRasterPos2i(60,360);
 | 
			
		||||
  printstring(GLUT_BITMAP_TIMES_ROMAN_24,"f - Togle Fog");
 | 
			
		||||
  glRasterPos2i(60,330);
 | 
			
		||||
  printstring(GLUT_BITMAP_TIMES_ROMAN_24,"Arrow Keys - Rotate");
 | 
			
		||||
  glRasterPos2i(60,300);
 | 
			
		||||
  printstring(GLUT_BITMAP_TIMES_ROMAN_24,"a - Increase velocity");
 | 
			
		||||
  glRasterPos2i(60,270);
 | 
			
		||||
  printstring(GLUT_BITMAP_TIMES_ROMAN_24,"z - Decrease velocity");
 | 
			
		||||
  glRasterPos2i(60,240);
 | 
			
		||||
  printstring(GLUT_BITMAP_TIMES_ROMAN_24,"l - Increase rain length");
 | 
			
		||||
  glRasterPos2i(60,210);
 | 
			
		||||
  printstring(GLUT_BITMAP_TIMES_ROMAN_24,"k - Increase rain length");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void drawrain(void)
 | 
			
		||||
{
 | 
			
		||||
  static int count=0;
 | 
			
		||||
  static char frbuf[80];
 | 
			
		||||
  float fr;
 | 
			
		||||
 | 
			
		||||
  glEnable(GL_DEPTH_TEST);
 | 
			
		||||
 | 
			
		||||
  if(fog)
 | 
			
		||||
    glEnable(GL_FOG);
 | 
			
		||||
  else
 | 
			
		||||
    glDisable(GL_FOG);
 | 
			
		||||
 | 
			
		||||
  glDepthMask(GL_TRUE);
 | 
			
		||||
  glClearColor(1.0,1.0,1.0,1.0);
 | 
			
		||||
  glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
 | 
			
		||||
 | 
			
		||||
  glPushMatrix();
 | 
			
		||||
  calcposobs();
 | 
			
		||||
  gluLookAt(obs[0],obs[1],obs[2],
 | 
			
		||||
	    obs[0]+dir[0],obs[1]+dir[1],obs[2]+dir[2],
 | 
			
		||||
	    0.0,1.0,0.0);
 | 
			
		||||
 | 
			
		||||
  glColor4f(1.0,1.0,1.0,1.0);
 | 
			
		||||
 | 
			
		||||
  glEnable(GL_TEXTURE_2D);
 | 
			
		||||
 | 
			
		||||
  glBindTexture(GL_TEXTURE_2D,groundid);
 | 
			
		||||
  glBegin(GL_QUADS);
 | 
			
		||||
  glTexCoord2fv(qt[0]);
 | 
			
		||||
  glVertex3fv(q[0]);
 | 
			
		||||
  glTexCoord2fv(qt[1]);
 | 
			
		||||
  glVertex3fv(q[1]);
 | 
			
		||||
  glTexCoord2fv(qt[2]);
 | 
			
		||||
  glVertex3fv(q[2]);
 | 
			
		||||
  glTexCoord2fv(qt[3]);
 | 
			
		||||
  glVertex3fv(q[3]);
 | 
			
		||||
  glEnd();
 | 
			
		||||
 | 
			
		||||
  // Particle System
 | 
			
		||||
 | 
			
		||||
  glDisable(GL_TEXTURE_2D);
 | 
			
		||||
  glShadeModel(GL_SMOOTH);
 | 
			
		||||
  glEnable(GL_BLEND);
 | 
			
		||||
 | 
			
		||||
  ps->draw();
 | 
			
		||||
  ps->addTime(gettimerain());
 | 
			
		||||
  
 | 
			
		||||
  glShadeModel(GL_FLAT);
 | 
			
		||||
 
 | 
			
		||||
 | 
			
		||||
  if((count % FRAME)==0) {
 | 
			
		||||
    fr=gettime();
 | 
			
		||||
    sprintf(frbuf,"Frame rate: %f",FRAME/fr);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  glDisable(GL_TEXTURE_2D);
 | 
			
		||||
  glDisable(GL_DEPTH_TEST);
 | 
			
		||||
  glDisable(GL_FOG);
 | 
			
		||||
 | 
			
		||||
  glMatrixMode(GL_PROJECTION);
 | 
			
		||||
  glLoadIdentity();
 | 
			
		||||
  glOrtho(-0.5,639.5,-0.5,479.5,-1.0,1.0);
 | 
			
		||||
  glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
  glLoadIdentity();
 | 
			
		||||
 | 
			
		||||
  glColor3f(1.0,0.0,0.0);
 | 
			
		||||
  glRasterPos2i(10,10);
 | 
			
		||||
  printstring(GLUT_BITMAP_HELVETICA_18,frbuf);
 | 
			
		||||
  glRasterPos2i(350,470);
 | 
			
		||||
  printstring(GLUT_BITMAP_HELVETICA_10,"Rain V1.0 Written by David Bucciarelli (humanware@plus.it)");
 | 
			
		||||
 | 
			
		||||
  if(help)
 | 
			
		||||
    printhelp();
 | 
			
		||||
 | 
			
		||||
  reshape(WIDTH,HEIGHT);
 | 
			
		||||
  glPopMatrix();
 | 
			
		||||
 | 
			
		||||
  glutSwapBuffers();
 | 
			
		||||
 | 
			
		||||
  count++;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void special(int key, int x, int y)
 | 
			
		||||
{
 | 
			
		||||
  switch (key) {
 | 
			
		||||
  case GLUT_KEY_LEFT:
 | 
			
		||||
    alpha+=2.0;
 | 
			
		||||
    break;
 | 
			
		||||
  case GLUT_KEY_RIGHT:
 | 
			
		||||
    alpha-=2.0;
 | 
			
		||||
    break;
 | 
			
		||||
  case GLUT_KEY_DOWN:
 | 
			
		||||
    beta-=2.0;
 | 
			
		||||
    break;
 | 
			
		||||
  case GLUT_KEY_UP:
 | 
			
		||||
    beta+=2.0;
 | 
			
		||||
    break;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void key(unsigned char key, int x, int y)
 | 
			
		||||
{
 | 
			
		||||
  switch (key) {
 | 
			
		||||
  case 27:
 | 
			
		||||
    exit(0);
 | 
			
		||||
    break;
 | 
			
		||||
 | 
			
		||||
  case 'a':
 | 
			
		||||
    v+=0.01;
 | 
			
		||||
    break;
 | 
			
		||||
  case 'z':
 | 
			
		||||
    v-=0.01;
 | 
			
		||||
    break;
 | 
			
		||||
 | 
			
		||||
  case 'l':
 | 
			
		||||
    rainParticle::setLength(rainParticle::getLength()+0.025f);
 | 
			
		||||
    break;
 | 
			
		||||
  case 'k':
 | 
			
		||||
    rainParticle::setLength(rainParticle::getLength()-0.025f);
 | 
			
		||||
    break;
 | 
			
		||||
 | 
			
		||||
  case 'h':
 | 
			
		||||
    help=(!help);
 | 
			
		||||
    break;
 | 
			
		||||
  case 'f':
 | 
			
		||||
    fog=(!fog);
 | 
			
		||||
    break;
 | 
			
		||||
#ifdef XMESA
 | 
			
		||||
  case ' ':
 | 
			
		||||
    XMesaSetFXmode(fullscreen ? XMESA_FX_FULLSCREEN : XMESA_FX_WINDOW);
 | 
			
		||||
    fullscreen=(!fullscreen);
 | 
			
		||||
    break;
 | 
			
		||||
#endif
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void inittextures(void)
 | 
			
		||||
{
 | 
			
		||||
  GLubyte *img;
 | 
			
		||||
  GLint width,height;
 | 
			
		||||
  GLenum format;
 | 
			
		||||
  GLenum gluerr;
 | 
			
		||||
 | 
			
		||||
  glGenTextures(1,&groundid);
 | 
			
		||||
  glBindTexture(GL_TEXTURE_2D,groundid);
 | 
			
		||||
 | 
			
		||||
  if(!(img=LoadRGBImage("../images/s128.rgb",&width,&height,&format))){
 | 
			
		||||
  	fprintf(stderr,"Error reading a texture.\n");
 | 
			
		||||
  	exit(-1);
 | 
			
		||||
  }
 | 
			
		||||
  glPixelStorei(GL_UNPACK_ALIGNMENT,4);
 | 
			
		||||
  if((gluerr=(GLenum)gluBuild2DMipmaps(GL_TEXTURE_2D, 3, width, height,GL_RGB,
 | 
			
		||||
			       GL_UNSIGNED_BYTE, (GLvoid *)(img)))) {
 | 
			
		||||
    fprintf(stderr,"GLULib%s\n",gluErrorString(gluerr));
 | 
			
		||||
    exit(-1);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT);
 | 
			
		||||
  glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_REPEAT);
 | 
			
		||||
 | 
			
		||||
  glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_LINEAR);
 | 
			
		||||
  glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
 | 
			
		||||
 | 
			
		||||
  glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_DECAL);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void initparticle(void)
 | 
			
		||||
{
 | 
			
		||||
  ps=new particleSystem;
 | 
			
		||||
 | 
			
		||||
  rainParticle::setRainingArea(-7.0f,-0.2f,-7.0f,7.0f,8.0f,7.0f);
 | 
			
		||||
 | 
			
		||||
  for(int i=0;i<NUMPART;i++) {
 | 
			
		||||
    rainParticle *p=new rainParticle;
 | 
			
		||||
    p->randomHeight();
 | 
			
		||||
 | 
			
		||||
    ps->addParticle((particle *)p);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int main(int ac,char **av)
 | 
			
		||||
{
 | 
			
		||||
  fprintf(stderr,"Rain V1.0\nWritten by David Bucciarelli (humanware@plus.it)\n");
 | 
			
		||||
 | 
			
		||||
  /* Default settings */
 | 
			
		||||
 | 
			
		||||
  WIDTH=640;
 | 
			
		||||
  HEIGHT=480;
 | 
			
		||||
 | 
			
		||||
  glutInitWindowPosition(0,0);
 | 
			
		||||
  glutInitWindowSize(WIDTH,HEIGHT);
 | 
			
		||||
  glutInit(&ac,av);
 | 
			
		||||
 | 
			
		||||
  glutInitDisplayMode(GLUT_RGB|GLUT_DEPTH|GLUT_DOUBLE);
 | 
			
		||||
 | 
			
		||||
  if(!(win=glutCreateWindow("Rain"))) {
 | 
			
		||||
    fprintf(stderr,"Error opening a window.\n");
 | 
			
		||||
    exit(-1);
 | 
			
		||||
  }
 | 
			
		||||
  
 | 
			
		||||
  reshape(WIDTH,HEIGHT);
 | 
			
		||||
 | 
			
		||||
  inittextures();
 | 
			
		||||
 | 
			
		||||
  glShadeModel(GL_FLAT);
 | 
			
		||||
  glEnable(GL_DEPTH_TEST);
 | 
			
		||||
 | 
			
		||||
  glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
 | 
			
		||||
 | 
			
		||||
  glEnable(GL_FOG);
 | 
			
		||||
  glFogi(GL_FOG_MODE,GL_EXP);
 | 
			
		||||
  glFogfv(GL_FOG_COLOR,fogcolor);
 | 
			
		||||
  glFogf(GL_FOG_DENSITY,0.1);
 | 
			
		||||
#ifdef FX
 | 
			
		||||
  glHint(GL_FOG_HINT,GL_NICEST);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
  initparticle();
 | 
			
		||||
 | 
			
		||||
  glutKeyboardFunc(key);
 | 
			
		||||
  glutSpecialFunc(special);
 | 
			
		||||
  glutDisplayFunc(drawrain);
 | 
			
		||||
  glutIdleFunc(drawrain);
 | 
			
		||||
  glutReshapeFunc(reshape);
 | 
			
		||||
  glutMainLoop();
 | 
			
		||||
 | 
			
		||||
  return(0);
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										902
									
								
								progs/demos/ray.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										902
									
								
								progs/demos/ray.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,902 @@
 | 
			
		||||
/*
 | 
			
		||||
 * This program is under the GNU GPL.
 | 
			
		||||
 * Use at your own risk.
 | 
			
		||||
 *
 | 
			
		||||
 * written by David Bucciarelli (tech.hmw@plus.it)
 | 
			
		||||
 *            Humanware s.r.l.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <math.h>
 | 
			
		||||
 | 
			
		||||
#ifdef WIN32
 | 
			
		||||
#include <windows.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
 | 
			
		||||
#ifdef XMESA
 | 
			
		||||
#include "GL/xmesa.h"
 | 
			
		||||
static int fullscreen = 1;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
static int WIDTH = 640;
 | 
			
		||||
static int HEIGHT = 480;
 | 
			
		||||
 | 
			
		||||
static GLint T0 = 0;
 | 
			
		||||
static GLint Frames = 0;
 | 
			
		||||
 | 
			
		||||
#define BASESIZE 7.5f
 | 
			
		||||
#define SPHERE_RADIUS 0.75f
 | 
			
		||||
 | 
			
		||||
#define TEX_CHECK_WIDTH 256
 | 
			
		||||
#define TEX_CHECK_HEIGHT 256
 | 
			
		||||
#define TEX_CHECK_SLOT_SIZE (TEX_CHECK_HEIGHT/16)
 | 
			
		||||
#define TEX_CHECK_NUMSLOT (TEX_CHECK_HEIGHT/TEX_CHECK_SLOT_SIZE)
 | 
			
		||||
 | 
			
		||||
#define TEX_REFLECT_WIDTH 256
 | 
			
		||||
#define TEX_REFLECT_HEIGHT 256
 | 
			
		||||
#define TEX_REFLECT_SLOT_SIZE (TEX_REFLECT_HEIGHT/16)
 | 
			
		||||
#define TEX_REFLECT_NUMSLOT (TEX_REFLECT_HEIGHT/TEX_REFLECT_SLOT_SIZE)
 | 
			
		||||
 | 
			
		||||
#ifndef M_PI
 | 
			
		||||
#define M_PI 3.1415926535
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define EPSILON 0.0001
 | 
			
		||||
 | 
			
		||||
#define clamp255(a)  ( (a)<(0.0f) ? (0.0f) : ((a)>(255.0f) ? (255.0f) : (a)) )
 | 
			
		||||
 | 
			
		||||
#define fabs(x) ((x)<0.0f?-(x):(x))
 | 
			
		||||
 | 
			
		||||
#define vequ(a,b) { (a)[0]=(b)[0]; (a)[1]=(b)[1]; (a)[2]=(b)[2]; }
 | 
			
		||||
#define vsub(a,b,c) { (a)[0]=(b)[0]-(c)[0]; (a)[1]=(b)[1]-(c)[1]; (a)[2]=(b)[2]-(c)[2]; }
 | 
			
		||||
#define	dprod(a,b) ((a)[0]*(b)[0]+(a)[1]*(b)[1]+(a)[2]*(b)[2])
 | 
			
		||||
#define vnormalize(a,b) { \
 | 
			
		||||
  register float m_norm; \
 | 
			
		||||
  m_norm=sqrt((double)dprod((a),(a))); \
 | 
			
		||||
  (a)[0] /=m_norm; \
 | 
			
		||||
  (a)[1] /=m_norm; \
 | 
			
		||||
  (a)[2] /=m_norm; }
 | 
			
		||||
 | 
			
		||||
static GLubyte checkmap[TEX_CHECK_HEIGHT][TEX_CHECK_WIDTH][3];
 | 
			
		||||
static GLuint checkid;
 | 
			
		||||
static int checkmap_currentslot = 0;
 | 
			
		||||
 | 
			
		||||
static GLubyte reflectmap[TEX_REFLECT_HEIGHT][TEX_REFLECT_WIDTH][3];
 | 
			
		||||
static GLuint reflectid;
 | 
			
		||||
static int reflectmap_currentslot = 0;
 | 
			
		||||
 | 
			
		||||
static GLuint lightdlist;
 | 
			
		||||
static GLuint objdlist;
 | 
			
		||||
 | 
			
		||||
static float lightpos[3] = { 2.1, 2.1, 2.8 };
 | 
			
		||||
static float objpos[3] = { 0.0, 0.0, 1.0 };
 | 
			
		||||
 | 
			
		||||
static float sphere_pos[TEX_CHECK_HEIGHT][TEX_REFLECT_WIDTH][3];
 | 
			
		||||
 | 
			
		||||
static int win = 0;
 | 
			
		||||
 | 
			
		||||
static float fogcolor[4] = { 0.05, 0.05, 0.05, 1.0 };
 | 
			
		||||
 | 
			
		||||
static float obs[3] = { 7.0, 0.0, 2.0 };
 | 
			
		||||
static float dir[3];
 | 
			
		||||
static float v = 0.0;
 | 
			
		||||
static float alpha = -90.0;
 | 
			
		||||
static float beta = 90.0;
 | 
			
		||||
 | 
			
		||||
static int fog = 1;
 | 
			
		||||
static int bfcull = 1;
 | 
			
		||||
static int poutline = 0;
 | 
			
		||||
static int help = 1;
 | 
			
		||||
static int showcheckmap = 1;
 | 
			
		||||
static int showreflectmap = 1;
 | 
			
		||||
static int joyavailable = 0;
 | 
			
		||||
static int joyactive = 0;
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
calcposobs(void)
 | 
			
		||||
{
 | 
			
		||||
   dir[0] = sin(alpha * M_PI / 180.0);
 | 
			
		||||
   dir[1] = cos(alpha * M_PI / 180.0) * sin(beta * M_PI / 180.0);
 | 
			
		||||
   dir[2] = cos(beta * M_PI / 180.0);
 | 
			
		||||
 | 
			
		||||
   if (dir[0] < 1.0e-5 && dir[0] > -1.0e-5)
 | 
			
		||||
      dir[0] = 0;
 | 
			
		||||
   if (dir[1] < 1.0e-5 && dir[1] > -1.0e-5)
 | 
			
		||||
      dir[1] = 0;
 | 
			
		||||
   if (dir[2] < 1.0e-5 && dir[2] > -1.0e-5)
 | 
			
		||||
      dir[2] = 0;
 | 
			
		||||
 | 
			
		||||
   obs[0] += v * dir[0];
 | 
			
		||||
   obs[1] += v * dir[1];
 | 
			
		||||
   obs[2] += v * dir[2];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
special(int k, int x, int y)
 | 
			
		||||
{
 | 
			
		||||
   switch (k) {
 | 
			
		||||
   case GLUT_KEY_LEFT:
 | 
			
		||||
      alpha -= 2.0;
 | 
			
		||||
      break;
 | 
			
		||||
   case GLUT_KEY_RIGHT:
 | 
			
		||||
      alpha += 2.0;
 | 
			
		||||
      break;
 | 
			
		||||
   case GLUT_KEY_DOWN:
 | 
			
		||||
      beta -= 2.0;
 | 
			
		||||
      break;
 | 
			
		||||
   case GLUT_KEY_UP:
 | 
			
		||||
      beta += 2.0;
 | 
			
		||||
      break;
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
key(unsigned char k, int x, int y)
 | 
			
		||||
{
 | 
			
		||||
   switch (k) {
 | 
			
		||||
   case 27:
 | 
			
		||||
      exit(0);
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
   case 's':
 | 
			
		||||
      lightpos[1] -= 0.1;
 | 
			
		||||
      break;
 | 
			
		||||
   case 'd':
 | 
			
		||||
      lightpos[1] += 0.1;
 | 
			
		||||
      break;
 | 
			
		||||
   case 'e':
 | 
			
		||||
      lightpos[0] -= 0.1;
 | 
			
		||||
      break;
 | 
			
		||||
   case 'x':
 | 
			
		||||
      lightpos[0] += 0.1;
 | 
			
		||||
      break;
 | 
			
		||||
   case 'w':
 | 
			
		||||
      lightpos[2] -= 0.1;
 | 
			
		||||
      break;
 | 
			
		||||
   case 'r':
 | 
			
		||||
      lightpos[2] += 0.1;
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
   case 'j':
 | 
			
		||||
      objpos[1] -= 0.1;
 | 
			
		||||
      break;
 | 
			
		||||
   case 'k':
 | 
			
		||||
      objpos[1] += 0.1;
 | 
			
		||||
      break;
 | 
			
		||||
   case 'i':
 | 
			
		||||
      objpos[0] -= 0.1;
 | 
			
		||||
      break;
 | 
			
		||||
   case 'm':
 | 
			
		||||
      objpos[0] += 0.1;
 | 
			
		||||
      break;
 | 
			
		||||
   case 'u':
 | 
			
		||||
      objpos[2] -= 0.1;
 | 
			
		||||
      break;
 | 
			
		||||
   case 'o':
 | 
			
		||||
      objpos[2] += 0.1;
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
   case 'a':
 | 
			
		||||
      v += 0.005;
 | 
			
		||||
      break;
 | 
			
		||||
   case 'z':
 | 
			
		||||
      v -= 0.005;
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
   case 'g':
 | 
			
		||||
      joyactive = (!joyactive);
 | 
			
		||||
      break;
 | 
			
		||||
   case 'h':
 | 
			
		||||
      help = (!help);
 | 
			
		||||
      break;
 | 
			
		||||
   case 'f':
 | 
			
		||||
      fog = (!fog);
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
   case '1':
 | 
			
		||||
      showcheckmap = (!showcheckmap);
 | 
			
		||||
      break;
 | 
			
		||||
   case '2':
 | 
			
		||||
      showreflectmap = (!showreflectmap);
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
   case 'b':
 | 
			
		||||
      if (bfcull) {
 | 
			
		||||
	 glDisable(GL_CULL_FACE);
 | 
			
		||||
	 bfcull = 0;
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
	 glEnable(GL_CULL_FACE);
 | 
			
		||||
	 bfcull = 1;
 | 
			
		||||
      }
 | 
			
		||||
      break;
 | 
			
		||||
   case 'p':
 | 
			
		||||
      if (poutline) {
 | 
			
		||||
	 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
 | 
			
		||||
	 poutline = 0;
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
	 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
 | 
			
		||||
	 poutline = 1;
 | 
			
		||||
      }
 | 
			
		||||
      break;
 | 
			
		||||
#ifdef XMESA
 | 
			
		||||
   case ' ':
 | 
			
		||||
      XMesaSetFXmode(fullscreen ? XMESA_FX_FULLSCREEN : XMESA_FX_WINDOW);
 | 
			
		||||
      fullscreen = (!fullscreen);
 | 
			
		||||
      break;
 | 
			
		||||
#endif
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
reshape(int w, int h)
 | 
			
		||||
{
 | 
			
		||||
   WIDTH = w;
 | 
			
		||||
   HEIGHT = h;
 | 
			
		||||
   glViewport(0, 0, w, h);
 | 
			
		||||
   glMatrixMode(GL_PROJECTION);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   gluPerspective(45.0, w / (float) h, 0.8, 40.0);
 | 
			
		||||
   glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
printstring(void *font, char *string)
 | 
			
		||||
{
 | 
			
		||||
   int len, i;
 | 
			
		||||
 | 
			
		||||
   len = (int) strlen(string);
 | 
			
		||||
   for (i = 0; i < len; i++)
 | 
			
		||||
      glutBitmapCharacter(font, string[i]);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
printhelp(void)
 | 
			
		||||
{
 | 
			
		||||
   glEnable(GL_BLEND);
 | 
			
		||||
   glColor4f(0.5, 0.5, 0.5, 0.5);
 | 
			
		||||
   glRecti(40, 40, 600, 440);
 | 
			
		||||
   glDisable(GL_BLEND);
 | 
			
		||||
 | 
			
		||||
   glColor3f(0.0, 0.0, 1.0);
 | 
			
		||||
   glRasterPos2i(300, 420);
 | 
			
		||||
   printstring(GLUT_BITMAP_HELVETICA_18, "Help");
 | 
			
		||||
 | 
			
		||||
   glRasterPos2i(60, 390);
 | 
			
		||||
   printstring(GLUT_BITMAP_HELVETICA_12, "h - Togle Help");
 | 
			
		||||
   glRasterPos2i(60, 370);
 | 
			
		||||
   printstring(GLUT_BITMAP_HELVETICA_12, "f - Togle Fog");
 | 
			
		||||
   glRasterPos2i(60, 350);
 | 
			
		||||
   printstring(GLUT_BITMAP_HELVETICA_12, "b - Togle Back face culling");
 | 
			
		||||
   glRasterPos2i(60, 330);
 | 
			
		||||
   printstring(GLUT_BITMAP_HELVETICA_12, "p - Togle Wire frame");
 | 
			
		||||
   glRasterPos2i(60, 310);
 | 
			
		||||
   printstring(GLUT_BITMAP_HELVETICA_12, "Arrow Keys - Rotate");
 | 
			
		||||
   glRasterPos2i(60, 290);
 | 
			
		||||
   printstring(GLUT_BITMAP_HELVETICA_12, "a - Increase velocity");
 | 
			
		||||
   glRasterPos2i(60, 270);
 | 
			
		||||
   printstring(GLUT_BITMAP_HELVETICA_12, "z - Decrease velocity");
 | 
			
		||||
 | 
			
		||||
   glRasterPos2i(60, 250);
 | 
			
		||||
   if (joyavailable)
 | 
			
		||||
      printstring(GLUT_BITMAP_HELVETICA_12,
 | 
			
		||||
		  "j - Togle jostick control (Joystick control available)");
 | 
			
		||||
   else
 | 
			
		||||
      printstring(GLUT_BITMAP_HELVETICA_12,
 | 
			
		||||
		  "(No Joystick control available)");
 | 
			
		||||
 | 
			
		||||
   glRasterPos2i(60, 230);
 | 
			
		||||
   printstring(GLUT_BITMAP_HELVETICA_12,
 | 
			
		||||
	       "To move the light source: s - left,  d - right,  e - far,  x - near,  w - down r - up");
 | 
			
		||||
   glRasterPos2i(60, 210);
 | 
			
		||||
   printstring(GLUT_BITMAP_HELVETICA_12,
 | 
			
		||||
	       "To move the mirror sphere: j - left,  k - right,  i - far,  m - near,  u - down o - up");
 | 
			
		||||
 | 
			
		||||
   glRasterPos2i(60, 190);
 | 
			
		||||
   printstring(GLUT_BITMAP_HELVETICA_12,
 | 
			
		||||
	       "1 - Togle the plane texture map window");
 | 
			
		||||
 | 
			
		||||
   glRasterPos2i(60, 170);
 | 
			
		||||
   printstring(GLUT_BITMAP_HELVETICA_12,
 | 
			
		||||
	       "2 - Togle the sphere texture map window");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static GLboolean
 | 
			
		||||
seelight(float p[3], float dir[3])
 | 
			
		||||
{
 | 
			
		||||
   float c[3], b, a, d, t, dist[3];
 | 
			
		||||
 | 
			
		||||
   vsub(c, p, objpos);
 | 
			
		||||
   b = -dprod(c, dir);
 | 
			
		||||
   a = dprod(c, c) - SPHERE_RADIUS * SPHERE_RADIUS;
 | 
			
		||||
 | 
			
		||||
   if ((d = b * b - a) < 0.0 || (b < 0.0 && a > 0.0))
 | 
			
		||||
      return GL_FALSE;
 | 
			
		||||
 | 
			
		||||
   d = sqrt(d);
 | 
			
		||||
 | 
			
		||||
   t = b - d;
 | 
			
		||||
 | 
			
		||||
   if (t < EPSILON) {
 | 
			
		||||
      t = b + d;
 | 
			
		||||
      if (t < EPSILON)
 | 
			
		||||
	 return GL_FALSE;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   vsub(dist, lightpos, p);
 | 
			
		||||
   if (dprod(dist, dist) < t * t)
 | 
			
		||||
      return GL_FALSE;
 | 
			
		||||
 | 
			
		||||
   return GL_TRUE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int
 | 
			
		||||
colorcheckmap(float ppos[3], float c[3])
 | 
			
		||||
{
 | 
			
		||||
   static float norm[3] = { 0.0f, 0.0f, 1.0f };
 | 
			
		||||
   float ldir[3], vdir[3], h[3], dfact, kfact, r, g, b;
 | 
			
		||||
   int x, y;
 | 
			
		||||
 | 
			
		||||
   x = (int) ((ppos[0] + BASESIZE / 2) * (10.0f / BASESIZE));
 | 
			
		||||
   if ((x < 0) || (x > 10))
 | 
			
		||||
      return GL_FALSE;
 | 
			
		||||
 | 
			
		||||
   y = (int) ((ppos[1] + BASESIZE / 2) * (10.0f / BASESIZE));
 | 
			
		||||
   if ((y < 0) || (y > 10))
 | 
			
		||||
      return GL_FALSE;
 | 
			
		||||
 | 
			
		||||
   r = 255.0f;
 | 
			
		||||
   if (y & 1) {
 | 
			
		||||
      if (x & 1)
 | 
			
		||||
	 g = 255.0f;
 | 
			
		||||
      else
 | 
			
		||||
	 g = 0.0f;
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      if (x & 1)
 | 
			
		||||
	 g = 0.0f;
 | 
			
		||||
      else
 | 
			
		||||
	 g = 255.0f;
 | 
			
		||||
   }
 | 
			
		||||
   b = 0.0f;
 | 
			
		||||
 | 
			
		||||
   vsub(ldir, lightpos, ppos);
 | 
			
		||||
   vnormalize(ldir, ldir);
 | 
			
		||||
 | 
			
		||||
   if (seelight(ppos, ldir)) {
 | 
			
		||||
      c[0] = r * 0.05f;
 | 
			
		||||
      c[1] = g * 0.05f;
 | 
			
		||||
      c[2] = b * 0.05f;
 | 
			
		||||
 | 
			
		||||
      return GL_TRUE;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   dfact = dprod(ldir, norm);
 | 
			
		||||
   if (dfact < 0.0f)
 | 
			
		||||
      dfact = 0.0f;
 | 
			
		||||
 | 
			
		||||
   vsub(vdir, obs, ppos);
 | 
			
		||||
   vnormalize(vdir, vdir);
 | 
			
		||||
   h[0] = 0.5f * (vdir[0] + ldir[0]);
 | 
			
		||||
   h[1] = 0.5f * (vdir[1] + ldir[1]);
 | 
			
		||||
   h[2] = 0.5f * (vdir[2] + ldir[2]);
 | 
			
		||||
   kfact = dprod(h, norm);
 | 
			
		||||
   kfact = pow(kfact, 6.0) * 7.0 * 255.0;
 | 
			
		||||
 | 
			
		||||
   r = r * dfact + kfact;
 | 
			
		||||
   g = g * dfact + kfact;
 | 
			
		||||
   b = b * dfact + kfact;
 | 
			
		||||
 | 
			
		||||
   c[0] = clamp255(r);
 | 
			
		||||
   c[1] = clamp255(g);
 | 
			
		||||
   c[2] = clamp255(b);
 | 
			
		||||
 | 
			
		||||
   return GL_TRUE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
updatecheckmap(int slot)
 | 
			
		||||
{
 | 
			
		||||
   float c[3], ppos[3];
 | 
			
		||||
   int x, y;
 | 
			
		||||
 | 
			
		||||
   glBindTexture(GL_TEXTURE_2D, checkid);
 | 
			
		||||
 | 
			
		||||
   ppos[2] = 0.0f;
 | 
			
		||||
   for (y = slot * TEX_CHECK_SLOT_SIZE; y < (slot + 1) * TEX_CHECK_SLOT_SIZE;
 | 
			
		||||
	y++) {
 | 
			
		||||
      ppos[1] = (y / (float) TEX_CHECK_HEIGHT) * BASESIZE - BASESIZE / 2;
 | 
			
		||||
 | 
			
		||||
      for (x = 0; x < TEX_CHECK_WIDTH; x++) {
 | 
			
		||||
	 ppos[0] = (x / (float) TEX_CHECK_WIDTH) * BASESIZE - BASESIZE / 2;
 | 
			
		||||
 | 
			
		||||
	 colorcheckmap(ppos, c);
 | 
			
		||||
	 checkmap[y][x][0] = (GLubyte) c[0];
 | 
			
		||||
	 checkmap[y][x][1] = (GLubyte) c[1];
 | 
			
		||||
	 checkmap[y][x][2] = (GLubyte) c[2];
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glTexSubImage2D(GL_TEXTURE_2D, 0, 0, slot * TEX_CHECK_SLOT_SIZE,
 | 
			
		||||
		   TEX_CHECK_WIDTH, TEX_CHECK_SLOT_SIZE, GL_RGB,
 | 
			
		||||
		   GL_UNSIGNED_BYTE,
 | 
			
		||||
		   &checkmap[slot * TEX_CHECK_SLOT_SIZE][0][0]);
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
updatereflectmap(int slot)
 | 
			
		||||
{
 | 
			
		||||
   float rf, r, g, b, t, dfact, kfact, rdir[3];
 | 
			
		||||
   float rcol[3], ppos[3], norm[3], ldir[3], h[3], vdir[3], planepos[3];
 | 
			
		||||
   int x, y;
 | 
			
		||||
 | 
			
		||||
   glBindTexture(GL_TEXTURE_2D, reflectid);
 | 
			
		||||
 | 
			
		||||
   for (y = slot * TEX_REFLECT_SLOT_SIZE;
 | 
			
		||||
	y < (slot + 1) * TEX_REFLECT_SLOT_SIZE; y++)
 | 
			
		||||
      for (x = 0; x < TEX_REFLECT_WIDTH; x++) {
 | 
			
		||||
	 ppos[0] = sphere_pos[y][x][0] + objpos[0];
 | 
			
		||||
	 ppos[1] = sphere_pos[y][x][1] + objpos[1];
 | 
			
		||||
	 ppos[2] = sphere_pos[y][x][2] + objpos[2];
 | 
			
		||||
 | 
			
		||||
	 vsub(norm, ppos, objpos);
 | 
			
		||||
	 vnormalize(norm, norm);
 | 
			
		||||
 | 
			
		||||
	 vsub(ldir, lightpos, ppos);
 | 
			
		||||
	 vnormalize(ldir, ldir);
 | 
			
		||||
	 vsub(vdir, obs, ppos);
 | 
			
		||||
	 vnormalize(vdir, vdir);
 | 
			
		||||
 | 
			
		||||
	 rf = 2.0f * dprod(norm, vdir);
 | 
			
		||||
	 if (rf > EPSILON) {
 | 
			
		||||
	    rdir[0] = rf * norm[0] - vdir[0];
 | 
			
		||||
	    rdir[1] = rf * norm[1] - vdir[1];
 | 
			
		||||
	    rdir[2] = rf * norm[2] - vdir[2];
 | 
			
		||||
 | 
			
		||||
	    t = -objpos[2] / rdir[2];
 | 
			
		||||
 | 
			
		||||
	    if (t > EPSILON) {
 | 
			
		||||
	       planepos[0] = objpos[0] + t * rdir[0];
 | 
			
		||||
	       planepos[1] = objpos[1] + t * rdir[1];
 | 
			
		||||
	       planepos[2] = 0.0f;
 | 
			
		||||
 | 
			
		||||
	       if (!colorcheckmap(planepos, rcol))
 | 
			
		||||
		  rcol[0] = rcol[1] = rcol[2] = 0.0f;
 | 
			
		||||
	    }
 | 
			
		||||
	    else
 | 
			
		||||
	       rcol[0] = rcol[1] = rcol[2] = 0.0f;
 | 
			
		||||
	 }
 | 
			
		||||
	 else
 | 
			
		||||
	    rcol[0] = rcol[1] = rcol[2] = 0.0f;
 | 
			
		||||
 | 
			
		||||
	 dfact = 0.1f * dprod(ldir, norm);
 | 
			
		||||
 | 
			
		||||
	 if (dfact < 0.0f) {
 | 
			
		||||
	    dfact = 0.0f;
 | 
			
		||||
	    kfact = 0.0f;
 | 
			
		||||
	 }
 | 
			
		||||
	 else {
 | 
			
		||||
	    h[0] = 0.5f * (vdir[0] + ldir[0]);
 | 
			
		||||
	    h[1] = 0.5f * (vdir[1] + ldir[1]);
 | 
			
		||||
	    h[2] = 0.5f * (vdir[2] + ldir[2]);
 | 
			
		||||
	    kfact = dprod(h, norm);
 | 
			
		||||
            kfact = pow(kfact, 4.0);
 | 
			
		||||
            if (kfact < 1.0e-10)
 | 
			
		||||
               kfact = 0.0;
 | 
			
		||||
         }
 | 
			
		||||
 | 
			
		||||
	 r = dfact + kfact;
 | 
			
		||||
	 g = dfact + kfact;
 | 
			
		||||
	 b = dfact + kfact;
 | 
			
		||||
 | 
			
		||||
	 r *= 255.0f;
 | 
			
		||||
	 g *= 255.0f;
 | 
			
		||||
	 b *= 255.0f;
 | 
			
		||||
 | 
			
		||||
	 r += rcol[0];
 | 
			
		||||
	 g += rcol[1];
 | 
			
		||||
	 b += rcol[2];
 | 
			
		||||
 | 
			
		||||
	 r = clamp255(r);
 | 
			
		||||
	 g = clamp255(g);
 | 
			
		||||
	 b = clamp255(b);
 | 
			
		||||
 | 
			
		||||
	 reflectmap[y][x][0] = (GLubyte) r;
 | 
			
		||||
	 reflectmap[y][x][1] = (GLubyte) g;
 | 
			
		||||
	 reflectmap[y][x][2] = (GLubyte) b;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
   glTexSubImage2D(GL_TEXTURE_2D, 0, 0, slot * TEX_REFLECT_SLOT_SIZE,
 | 
			
		||||
		   TEX_REFLECT_WIDTH, TEX_REFLECT_SLOT_SIZE, GL_RGB,
 | 
			
		||||
		   GL_UNSIGNED_BYTE,
 | 
			
		||||
		   &reflectmap[slot * TEX_REFLECT_SLOT_SIZE][0][0]);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
drawbase(void)
 | 
			
		||||
{
 | 
			
		||||
   glColor3f(0.0, 0.0, 0.0);
 | 
			
		||||
   glBindTexture(GL_TEXTURE_2D, checkid);
 | 
			
		||||
   glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
 | 
			
		||||
 | 
			
		||||
   glBegin(GL_QUADS);
 | 
			
		||||
   glTexCoord2f(0.0f, 0.0f);
 | 
			
		||||
   glVertex3f(-BASESIZE / 2.0f, -BASESIZE / 2.0f, 0.0f);
 | 
			
		||||
 | 
			
		||||
   glTexCoord2f(1.0f, 0.0f);
 | 
			
		||||
   glVertex3f(BASESIZE / 2.0f, -BASESIZE / 2.0f, 0.0f);
 | 
			
		||||
 | 
			
		||||
   glTexCoord2f(1.0f, 1.0f);
 | 
			
		||||
   glVertex3f(BASESIZE / 2.0f, BASESIZE / 2.0f, 0.0f);
 | 
			
		||||
 | 
			
		||||
   glTexCoord2f(0.0f, 1.0f);
 | 
			
		||||
   glVertex3f(-BASESIZE / 2.0f, BASESIZE / 2.0f, 0.0f);
 | 
			
		||||
 | 
			
		||||
   glEnd();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
drawobj(void)
 | 
			
		||||
{
 | 
			
		||||
   glColor3f(0.0, 0.0, 0.0);
 | 
			
		||||
   glBindTexture(GL_TEXTURE_2D, reflectid);
 | 
			
		||||
   glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
 | 
			
		||||
 | 
			
		||||
   glPushMatrix();
 | 
			
		||||
   glTranslatef(objpos[0], objpos[1], objpos[2]);
 | 
			
		||||
   glCallList(objdlist);
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
dojoy(void)
 | 
			
		||||
{
 | 
			
		||||
#ifdef WIN32
 | 
			
		||||
   static UINT max[2] = { 0, 0 };
 | 
			
		||||
   static UINT min[2] = { 0xffffffff, 0xffffffff }, center[2];
 | 
			
		||||
   MMRESULT res;
 | 
			
		||||
   JOYINFO joy;
 | 
			
		||||
 | 
			
		||||
   res = joyGetPos(JOYSTICKID1, &joy);
 | 
			
		||||
 | 
			
		||||
   if (res == JOYERR_NOERROR) {
 | 
			
		||||
      joyavailable = 1;
 | 
			
		||||
 | 
			
		||||
      if (max[0] < joy.wXpos)
 | 
			
		||||
	 max[0] = joy.wXpos;
 | 
			
		||||
      if (min[0] > joy.wXpos)
 | 
			
		||||
	 min[0] = joy.wXpos;
 | 
			
		||||
      center[0] = (max[0] + min[0]) / 2;
 | 
			
		||||
 | 
			
		||||
      if (max[1] < joy.wYpos)
 | 
			
		||||
	 max[1] = joy.wYpos;
 | 
			
		||||
      if (min[1] > joy.wYpos)
 | 
			
		||||
	 min[1] = joy.wYpos;
 | 
			
		||||
      center[1] = (max[1] + min[1]) / 2;
 | 
			
		||||
 | 
			
		||||
      if (joyactive) {
 | 
			
		||||
	 if (fabs(center[0] - (float) joy.wXpos) > 0.1 * (max[0] - min[0]))
 | 
			
		||||
	    alpha -=
 | 
			
		||||
	       2.5 * (center[0] - (float) joy.wXpos) / (max[0] - min[0]);
 | 
			
		||||
	 if (fabs(center[1] - (float) joy.wYpos) > 0.1 * (max[1] - min[1]))
 | 
			
		||||
	    beta += 2.5 * (center[1] - (float) joy.wYpos) / (max[1] - min[1]);
 | 
			
		||||
 | 
			
		||||
	 if (joy.wButtons & JOY_BUTTON1)
 | 
			
		||||
	    v += 0.005;
 | 
			
		||||
	 if (joy.wButtons & JOY_BUTTON2)
 | 
			
		||||
	    v -= 0.005;
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
   else
 | 
			
		||||
      joyavailable = 0;
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
updatemaps(void)
 | 
			
		||||
{
 | 
			
		||||
   updatecheckmap(checkmap_currentslot);
 | 
			
		||||
   checkmap_currentslot = (checkmap_currentslot + 1) % TEX_CHECK_NUMSLOT;
 | 
			
		||||
 | 
			
		||||
   updatereflectmap(reflectmap_currentslot);
 | 
			
		||||
   reflectmap_currentslot =
 | 
			
		||||
      (reflectmap_currentslot + 1) % TEX_REFLECT_NUMSLOT;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
draw(void)
 | 
			
		||||
{
 | 
			
		||||
   static char frbuf[80] = "";
 | 
			
		||||
 | 
			
		||||
   dojoy();
 | 
			
		||||
 | 
			
		||||
   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 | 
			
		||||
 | 
			
		||||
   glEnable(GL_TEXTURE_2D);
 | 
			
		||||
   glEnable(GL_DEPTH_TEST);
 | 
			
		||||
   if (fog)
 | 
			
		||||
      glEnable(GL_FOG);
 | 
			
		||||
   else
 | 
			
		||||
      glDisable(GL_FOG);
 | 
			
		||||
 | 
			
		||||
   glPushMatrix();
 | 
			
		||||
   calcposobs();
 | 
			
		||||
 | 
			
		||||
   gluLookAt(obs[0], obs[1], obs[2],
 | 
			
		||||
	     obs[0] + dir[0], obs[1] + dir[1], obs[2] + dir[2],
 | 
			
		||||
	     0.0, 0.0, 1.0);
 | 
			
		||||
 | 
			
		||||
   drawbase();
 | 
			
		||||
   drawobj();
 | 
			
		||||
 | 
			
		||||
   glColor3f(1.0, 1.0, 1.0);
 | 
			
		||||
   glDisable(GL_TEXTURE_2D);
 | 
			
		||||
 | 
			
		||||
   glPushMatrix();
 | 
			
		||||
   glTranslatef(lightpos[0], lightpos[1], lightpos[2]);
 | 
			
		||||
   glCallList(lightdlist);
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
 | 
			
		||||
   glDisable(GL_DEPTH_TEST);
 | 
			
		||||
   glDisable(GL_FOG);
 | 
			
		||||
 | 
			
		||||
   glMatrixMode(GL_PROJECTION);
 | 
			
		||||
   glPushMatrix();
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glOrtho(-0.5, 639.5, -0.5, 479.5, -1.0, 1.0);
 | 
			
		||||
   glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
 | 
			
		||||
   glColor3f(0.0f, 0.3f, 1.0f);
 | 
			
		||||
 | 
			
		||||
   if (showcheckmap) {
 | 
			
		||||
      glEnable(GL_TEXTURE_2D);
 | 
			
		||||
      glBindTexture(GL_TEXTURE_2D, checkid);
 | 
			
		||||
      glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
 | 
			
		||||
 | 
			
		||||
      glBegin(GL_QUADS);
 | 
			
		||||
      glTexCoord2f(1.0f, 0.0f);
 | 
			
		||||
      glVertex2i(10, 30);
 | 
			
		||||
      glTexCoord2f(1.0f, 1.0f);
 | 
			
		||||
      glVertex2i(10 + 90, 30);
 | 
			
		||||
      glTexCoord2f(0.0f, 1.0f);
 | 
			
		||||
      glVertex2i(10 + 90, 30 + 90);
 | 
			
		||||
      glTexCoord2f(0.0f, 0.0f);
 | 
			
		||||
      glVertex2i(10, 30 + 90);
 | 
			
		||||
      glEnd();
 | 
			
		||||
 | 
			
		||||
      glDisable(GL_TEXTURE_2D);
 | 
			
		||||
      glBegin(GL_LINE_LOOP);
 | 
			
		||||
      glVertex2i(10, 30);
 | 
			
		||||
      glVertex2i(10 + 90, 30);
 | 
			
		||||
      glVertex2i(10 + 90, 30 + 90);
 | 
			
		||||
      glVertex2i(10, 30 + 90);
 | 
			
		||||
      glEnd();
 | 
			
		||||
      glRasterPos2i(105, 65);
 | 
			
		||||
      printstring(GLUT_BITMAP_HELVETICA_18, "Plane Texture Map");
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   if (showreflectmap) {
 | 
			
		||||
      glEnable(GL_TEXTURE_2D);
 | 
			
		||||
      glBindTexture(GL_TEXTURE_2D, reflectid);
 | 
			
		||||
      glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
 | 
			
		||||
 | 
			
		||||
      glBegin(GL_QUADS);
 | 
			
		||||
      glTexCoord2f(1.0f, 0.0f);
 | 
			
		||||
      glVertex2i(540, 30);
 | 
			
		||||
      glTexCoord2f(1.0f, 1.0f);
 | 
			
		||||
      glVertex2i(540 + 90, 30);
 | 
			
		||||
      glTexCoord2f(0.0f, 1.0f);
 | 
			
		||||
      glVertex2i(540 + 90, 30 + 90);
 | 
			
		||||
      glTexCoord2f(0.0f, 0.0f);
 | 
			
		||||
      glVertex2i(540, 30 + 90);
 | 
			
		||||
      glEnd();
 | 
			
		||||
 | 
			
		||||
      glDisable(GL_TEXTURE_2D);
 | 
			
		||||
      glBegin(GL_LINE_LOOP);
 | 
			
		||||
      glVertex2i(540, 30);
 | 
			
		||||
      glVertex2i(540 + 90, 30);
 | 
			
		||||
      glVertex2i(540 + 90, 30 + 90);
 | 
			
		||||
      glVertex2i(540, 30 + 90);
 | 
			
		||||
      glEnd();
 | 
			
		||||
      glRasterPos2i(360, 65);
 | 
			
		||||
      printstring(GLUT_BITMAP_HELVETICA_18, "Sphere Texture Map");
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glDisable(GL_TEXTURE_2D);
 | 
			
		||||
 | 
			
		||||
   glRasterPos2i(10, 10);
 | 
			
		||||
   printstring(GLUT_BITMAP_HELVETICA_18, frbuf);
 | 
			
		||||
   glRasterPos2i(360, 470);
 | 
			
		||||
   printstring(GLUT_BITMAP_HELVETICA_10,
 | 
			
		||||
	       "Ray V1.0 Written by David Bucciarelli (tech.hmw@plus.it)");
 | 
			
		||||
 | 
			
		||||
   if (help)
 | 
			
		||||
      printhelp();
 | 
			
		||||
 | 
			
		||||
   glMatrixMode(GL_PROJECTION);
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
   glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
 | 
			
		||||
   updatemaps();
 | 
			
		||||
 | 
			
		||||
   glutSwapBuffers();
 | 
			
		||||
 | 
			
		||||
   Frames++;
 | 
			
		||||
   {
 | 
			
		||||
      GLint t = glutGet(GLUT_ELAPSED_TIME);
 | 
			
		||||
      if (t - T0 >= 2000) {
 | 
			
		||||
         GLfloat seconds = (t - T0) / 1000.0;
 | 
			
		||||
         GLfloat fps = Frames / seconds;
 | 
			
		||||
         sprintf(frbuf, "Frame rate: %f", fps);
 | 
			
		||||
         T0 = t;
 | 
			
		||||
         Frames = 0;
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
inittextures(void)
 | 
			
		||||
{
 | 
			
		||||
   int y;
 | 
			
		||||
 | 
			
		||||
   glGenTextures(1, &checkid);
 | 
			
		||||
   glBindTexture(GL_TEXTURE_2D, checkid);
 | 
			
		||||
 | 
			
		||||
   glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
 | 
			
		||||
   glTexImage2D(GL_TEXTURE_2D, 0, 3, TEX_CHECK_WIDTH, TEX_CHECK_HEIGHT,
 | 
			
		||||
		0, GL_RGB, GL_UNSIGNED_BYTE, checkmap);
 | 
			
		||||
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
 | 
			
		||||
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 | 
			
		||||
 | 
			
		||||
   for (y = 0; y < TEX_CHECK_NUMSLOT; y++)
 | 
			
		||||
      updatecheckmap(y);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   glGenTextures(1, &reflectid);
 | 
			
		||||
   glBindTexture(GL_TEXTURE_2D, reflectid);
 | 
			
		||||
 | 
			
		||||
   glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
 | 
			
		||||
   glTexImage2D(GL_TEXTURE_2D, 0, 3, TEX_REFLECT_WIDTH, TEX_REFLECT_HEIGHT,
 | 
			
		||||
		0, GL_RGB, GL_UNSIGNED_BYTE, reflectmap);
 | 
			
		||||
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
 | 
			
		||||
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 | 
			
		||||
 | 
			
		||||
   for (y = 0; y < TEX_REFLECT_NUMSLOT; y++)
 | 
			
		||||
      updatereflectmap(y);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
initspherepos(void)
 | 
			
		||||
{
 | 
			
		||||
   float alpha, beta, sa, ca, sb, cb;
 | 
			
		||||
   int x, y;
 | 
			
		||||
 | 
			
		||||
   for (y = 0; y < TEX_REFLECT_HEIGHT; y++) {
 | 
			
		||||
      beta = M_PI - y * (M_PI / TEX_REFLECT_HEIGHT);
 | 
			
		||||
 | 
			
		||||
      for (x = 0; x < TEX_REFLECT_WIDTH; x++) {
 | 
			
		||||
	 alpha = -x * (2.0f * M_PI / TEX_REFLECT_WIDTH);
 | 
			
		||||
 | 
			
		||||
	 sa = sin(alpha);
 | 
			
		||||
	 ca = cos(alpha);
 | 
			
		||||
 | 
			
		||||
	 sb = sin(beta);
 | 
			
		||||
	 cb = cos(beta);
 | 
			
		||||
 | 
			
		||||
	 sphere_pos[y][x][0] = SPHERE_RADIUS * sa * sb;
 | 
			
		||||
	 sphere_pos[y][x][1] = SPHERE_RADIUS * ca * sb;
 | 
			
		||||
	 sphere_pos[y][x][2] = SPHERE_RADIUS * cb;
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
initdlists(void)
 | 
			
		||||
{
 | 
			
		||||
   GLUquadricObj *obj;
 | 
			
		||||
 | 
			
		||||
   obj = gluNewQuadric();
 | 
			
		||||
 | 
			
		||||
   lightdlist = glGenLists(1);
 | 
			
		||||
   glNewList(lightdlist, GL_COMPILE);
 | 
			
		||||
   gluQuadricDrawStyle(obj, GLU_FILL);
 | 
			
		||||
   gluQuadricNormals(obj, GLU_NONE);
 | 
			
		||||
   gluQuadricTexture(obj, GL_TRUE);
 | 
			
		||||
   gluSphere(obj, 0.25f, 6, 6);
 | 
			
		||||
   glEndList();
 | 
			
		||||
 | 
			
		||||
   objdlist = glGenLists(1);
 | 
			
		||||
   glNewList(objdlist, GL_COMPILE);
 | 
			
		||||
   gluQuadricDrawStyle(obj, GLU_FILL);
 | 
			
		||||
   gluQuadricNormals(obj, GLU_NONE);
 | 
			
		||||
   gluQuadricTexture(obj, GL_TRUE);
 | 
			
		||||
   gluSphere(obj, SPHERE_RADIUS, 16, 16);
 | 
			
		||||
   glEndList();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int
 | 
			
		||||
main(int ac, char **av)
 | 
			
		||||
{
 | 
			
		||||
   fprintf(stderr,
 | 
			
		||||
	   "Ray V1.0\nWritten by David Bucciarelli (tech.hmw@plus.it)\n");
 | 
			
		||||
 | 
			
		||||
   /*
 | 
			
		||||
      if(!SetPriorityClass(GetCurrentProcess(),REALTIME_PRIORITY_CLASS)) {
 | 
			
		||||
      fprintf(stderr,"Error setting the process class.\n");
 | 
			
		||||
      return 0;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      if(!SetThreadPriority(GetCurrentThread(),THREAD_PRIORITY_TIME_CRITICAL)) {
 | 
			
		||||
      fprintf(stderr,"Error setting the process priority.\n");
 | 
			
		||||
      return 0;
 | 
			
		||||
      }
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   glutInitWindowPosition(0, 0);
 | 
			
		||||
   glutInitWindowSize(WIDTH, HEIGHT);
 | 
			
		||||
   glutInit(&ac, av);
 | 
			
		||||
 | 
			
		||||
   glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
 | 
			
		||||
 | 
			
		||||
   if (!(win = glutCreateWindow("Ray"))) {
 | 
			
		||||
      fprintf(stderr, "Error, couldn't open window\n");
 | 
			
		||||
      return -1;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   reshape(WIDTH, HEIGHT);
 | 
			
		||||
 | 
			
		||||
   glShadeModel(GL_FLAT);
 | 
			
		||||
   glEnable(GL_DEPTH_TEST);
 | 
			
		||||
   glDepthFunc(GL_LEQUAL);
 | 
			
		||||
   glEnable(GL_CULL_FACE);
 | 
			
		||||
   glEnable(GL_TEXTURE_2D);
 | 
			
		||||
   glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 | 
			
		||||
 | 
			
		||||
   glEnable(GL_FOG);
 | 
			
		||||
   glFogi(GL_FOG_MODE, GL_EXP2);
 | 
			
		||||
   glFogfv(GL_FOG_COLOR, fogcolor);
 | 
			
		||||
 | 
			
		||||
   glFogf(GL_FOG_DENSITY, 0.01);
 | 
			
		||||
#ifdef FX
 | 
			
		||||
   glHint(GL_FOG_HINT, GL_NICEST);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   calcposobs();
 | 
			
		||||
 | 
			
		||||
   initspherepos();
 | 
			
		||||
 | 
			
		||||
   inittextures();
 | 
			
		||||
   initdlists();
 | 
			
		||||
 | 
			
		||||
   glClearColor(fogcolor[0], fogcolor[1], fogcolor[2], fogcolor[3]);
 | 
			
		||||
 | 
			
		||||
   glutReshapeFunc(reshape);
 | 
			
		||||
   glutDisplayFunc(draw);
 | 
			
		||||
   glutKeyboardFunc(key);
 | 
			
		||||
   glutSpecialFunc(special);
 | 
			
		||||
   glutIdleFunc(draw);
 | 
			
		||||
 | 
			
		||||
   glutMainLoop();
 | 
			
		||||
 | 
			
		||||
   return 0;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										300
									
								
								progs/demos/readpix.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										300
									
								
								progs/demos/readpix.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,300 @@
 | 
			
		||||
/* $Id: readpix.c,v 1.4.2.2 2002/07/12 15:50:46 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * glReadPixels and glCopyPixels test
 | 
			
		||||
 * 
 | 
			
		||||
 * Brian Paul   March 1, 2000  This file is in the public domain.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: readpix.c,v $
 | 
			
		||||
 * Revision 1.4.2.2  2002/07/12 15:50:46  brianp
 | 
			
		||||
 * Pedantic compiler fixes (Sven Panne)
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.4.2.1  2002/05/01 14:53:52  alanh
 | 
			
		||||
 * glutSwapBuffers implicitly does a glFinish when swapping back to the front
 | 
			
		||||
 * buffer. We now issue a glFinish when not issuing SwapBuffers to ensure
 | 
			
		||||
 * the pipeline is complete.
 | 
			
		||||
 *
 | 
			
		||||
 * (Problem found with Chromium).
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.4  2000/10/16 21:24:39  brianp
 | 
			
		||||
 * use gray background, memset TempImage to white to help with debugging
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.3  2000/03/31 01:01:31  brianp
 | 
			
		||||
 * tweaks to allow different read formats/types
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.2  2000/03/23 19:47:25  brianp
 | 
			
		||||
 * added benchmarking
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.1  2000/03/01 16:23:14  brianp
 | 
			
		||||
 * test glDraw/Read/CopyPixels()
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <assert.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
 | 
			
		||||
#include "../util/readtex.c"  /* a hack, I know */
 | 
			
		||||
 | 
			
		||||
#define IMAGE_FILE "../images/girl.rgb"
 | 
			
		||||
 | 
			
		||||
static int ImgWidth, ImgHeight;
 | 
			
		||||
static GLenum ImgFormat;
 | 
			
		||||
static GLubyte *Image = NULL;
 | 
			
		||||
 | 
			
		||||
static int APosX, APosY;  /* simple drawpixels */
 | 
			
		||||
static int BPosX, BPosY;  /* read/draw pixels */
 | 
			
		||||
static int CPosX, CPosY;  /* copypixels */
 | 
			
		||||
 | 
			
		||||
static GLboolean DrawFront = GL_FALSE;
 | 
			
		||||
static GLboolean ScaleAndBias = GL_FALSE;
 | 
			
		||||
static GLboolean Benchmark = GL_FALSE;
 | 
			
		||||
static GLubyte *TempImage = NULL;
 | 
			
		||||
 | 
			
		||||
#if 0
 | 
			
		||||
#define ReadFormat ImgFormat
 | 
			
		||||
#define ReadType GL_UNSIGNED_BYTE
 | 
			
		||||
#endif
 | 
			
		||||
#if 1
 | 
			
		||||
static GLenum ReadFormat = GL_RGBA;
 | 
			
		||||
static GLenum ReadType = GL_UNSIGNED_BYTE;
 | 
			
		||||
#endif
 | 
			
		||||
#if 0
 | 
			
		||||
static GLenum ReadFormat = GL_RGB;
 | 
			
		||||
static GLenum ReadType = GL_UNSIGNED_SHORT_5_6_5;
 | 
			
		||||
#endif
 | 
			
		||||
#if 0
 | 
			
		||||
static GLenum ReadFormat = GL_RGBA;
 | 
			
		||||
static GLenum ReadType = GL_UNSIGNED_SHORT_1_5_5_5_REV;
 | 
			
		||||
#endif
 | 
			
		||||
#if 0
 | 
			
		||||
static GLenum ReadFormat = GL_BGRA;
 | 
			
		||||
static GLenum ReadType = GL_UNSIGNED_SHORT_5_5_5_1;
 | 
			
		||||
#endif
 | 
			
		||||
#if 0
 | 
			
		||||
static GLenum ReadFormat = GL_BGRA;
 | 
			
		||||
static GLenum ReadType = GL_UNSIGNED_SHORT_4_4_4_4_REV;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
Reset( void )
 | 
			
		||||
{
 | 
			
		||||
   APosX = 5;     APosY = 20;
 | 
			
		||||
   BPosX = APosX + ImgWidth + 5;   BPosY = 20;
 | 
			
		||||
   CPosX = BPosX + ImgWidth + 5;   CPosY = 20;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
PrintString(const char *s)
 | 
			
		||||
{
 | 
			
		||||
   while (*s) {
 | 
			
		||||
      glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s);
 | 
			
		||||
      s++;
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
SetupPixelTransfer(GLboolean invert)
 | 
			
		||||
{
 | 
			
		||||
   if (invert) {
 | 
			
		||||
      glPixelTransferf(GL_RED_SCALE, -1.0);
 | 
			
		||||
      glPixelTransferf(GL_RED_BIAS, 1.0);
 | 
			
		||||
      glPixelTransferf(GL_GREEN_SCALE, -1.0);
 | 
			
		||||
      glPixelTransferf(GL_GREEN_BIAS, 1.0);
 | 
			
		||||
      glPixelTransferf(GL_BLUE_SCALE, -1.0);
 | 
			
		||||
      glPixelTransferf(GL_BLUE_BIAS, 1.0);
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      glPixelTransferf(GL_RED_SCALE, 1.0);
 | 
			
		||||
      glPixelTransferf(GL_RED_BIAS, 0.0);
 | 
			
		||||
      glPixelTransferf(GL_GREEN_SCALE, 1.0);
 | 
			
		||||
      glPixelTransferf(GL_GREEN_BIAS, 0.0);
 | 
			
		||||
      glPixelTransferf(GL_BLUE_SCALE, 1.0);
 | 
			
		||||
      glPixelTransferf(GL_BLUE_BIAS, 0.0);
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
Display( void )
 | 
			
		||||
{
 | 
			
		||||
   glClearColor(.3, .3, .3, 1);
 | 
			
		||||
   glClear( GL_COLOR_BUFFER_BIT );
 | 
			
		||||
 | 
			
		||||
   glRasterPos2i(5, ImgHeight+25);
 | 
			
		||||
   PrintString("f = toggle front/back  s = toggle scale/bias  b = benchmark");
 | 
			
		||||
 | 
			
		||||
   /* draw original image */
 | 
			
		||||
   glRasterPos2i(APosX, 5);
 | 
			
		||||
   PrintString("Original");
 | 
			
		||||
   glRasterPos2i(APosX, APosY);
 | 
			
		||||
   glEnable(GL_DITHER);
 | 
			
		||||
   SetupPixelTransfer(GL_FALSE);
 | 
			
		||||
   glDrawPixels(ImgWidth, ImgHeight, ImgFormat, GL_UNSIGNED_BYTE, Image);
 | 
			
		||||
 | 
			
		||||
   /* do readpixels, drawpixels */
 | 
			
		||||
   glRasterPos2i(BPosX, 5);
 | 
			
		||||
   PrintString("Read/DrawPixels");
 | 
			
		||||
   SetupPixelTransfer(ScaleAndBias);
 | 
			
		||||
   if (Benchmark) {
 | 
			
		||||
      GLint reads = 0;
 | 
			
		||||
      GLint endTime;
 | 
			
		||||
      GLint startTime = glutGet(GLUT_ELAPSED_TIME);
 | 
			
		||||
      GLdouble seconds, pixelsPerSecond;
 | 
			
		||||
      printf("Benchmarking...\n");
 | 
			
		||||
      do {
 | 
			
		||||
         glReadPixels(APosX, APosY, ImgWidth, ImgHeight,
 | 
			
		||||
                      ReadFormat, ReadType, TempImage);
 | 
			
		||||
         reads++;
 | 
			
		||||
         endTime = glutGet(GLUT_ELAPSED_TIME);
 | 
			
		||||
      } while (endTime - startTime < 4000);   /* 4 seconds */
 | 
			
		||||
      seconds = (double) (endTime - startTime) / 1000.0;
 | 
			
		||||
      pixelsPerSecond = reads * ImgWidth * ImgHeight / seconds;
 | 
			
		||||
      printf("Result:  %d reads in %f seconds = %f pixels/sec\n",
 | 
			
		||||
             reads, seconds, pixelsPerSecond);
 | 
			
		||||
      Benchmark = GL_FALSE;
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      /* clear the temporary image to white (helpful for debugging */
 | 
			
		||||
      memset(TempImage, 255, ImgWidth * ImgHeight * 4);
 | 
			
		||||
      glReadPixels(APosX, APosY, ImgWidth, ImgHeight,
 | 
			
		||||
                   ReadFormat, ReadType, TempImage);
 | 
			
		||||
   }
 | 
			
		||||
   glRasterPos2i(BPosX, BPosY);
 | 
			
		||||
   glDisable(GL_DITHER);
 | 
			
		||||
   SetupPixelTransfer(GL_FALSE);
 | 
			
		||||
   glDrawPixels(ImgWidth, ImgHeight, ReadFormat, ReadType, TempImage);
 | 
			
		||||
 | 
			
		||||
   /* do copypixels */
 | 
			
		||||
   glRasterPos2i(CPosX, 5);
 | 
			
		||||
   PrintString("CopyPixels");
 | 
			
		||||
   glRasterPos2i(CPosX, CPosY);
 | 
			
		||||
   glDisable(GL_DITHER);
 | 
			
		||||
   SetupPixelTransfer(ScaleAndBias);
 | 
			
		||||
   glCopyPixels(APosX, APosY, ImgWidth, ImgHeight, GL_COLOR);
 | 
			
		||||
 | 
			
		||||
   if (!DrawFront)
 | 
			
		||||
      glutSwapBuffers();
 | 
			
		||||
   else
 | 
			
		||||
      glFinish();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
Reshape( int width, int height )
 | 
			
		||||
{
 | 
			
		||||
   glViewport( 0, 0, width, height );
 | 
			
		||||
   glMatrixMode( GL_PROJECTION );
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glOrtho( 0.0, width, 0.0, height, -1.0, 1.0 );
 | 
			
		||||
   glMatrixMode( GL_MODELVIEW );
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
Key( unsigned char key, int x, int y )
 | 
			
		||||
{
 | 
			
		||||
   (void) x;
 | 
			
		||||
   (void) y;
 | 
			
		||||
   switch (key) {
 | 
			
		||||
      case 'b':
 | 
			
		||||
         Benchmark = GL_TRUE;
 | 
			
		||||
         break;
 | 
			
		||||
      case 's':
 | 
			
		||||
         ScaleAndBias = !ScaleAndBias;
 | 
			
		||||
         break;
 | 
			
		||||
      case 'f':
 | 
			
		||||
         DrawFront = !DrawFront;
 | 
			
		||||
         if (DrawFront) {
 | 
			
		||||
            glDrawBuffer(GL_FRONT);
 | 
			
		||||
            glReadBuffer(GL_FRONT);
 | 
			
		||||
         }
 | 
			
		||||
         else {
 | 
			
		||||
            glDrawBuffer(GL_BACK);
 | 
			
		||||
            glReadBuffer(GL_BACK);
 | 
			
		||||
         }
 | 
			
		||||
         printf("glDrawBuffer(%s)\n", DrawFront ? "GL_FRONT" : "GL_BACK");
 | 
			
		||||
         break;
 | 
			
		||||
      case 27:
 | 
			
		||||
         exit(0);
 | 
			
		||||
         break;
 | 
			
		||||
   }
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
Init( GLboolean ciMode )
 | 
			
		||||
{
 | 
			
		||||
   printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
 | 
			
		||||
   printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
 | 
			
		||||
 | 
			
		||||
   Image = LoadRGBImage( IMAGE_FILE, &ImgWidth, &ImgHeight, &ImgFormat );
 | 
			
		||||
   if (!Image) {
 | 
			
		||||
      printf("Couldn't read %s\n", IMAGE_FILE);
 | 
			
		||||
      exit(0);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   if (ciMode) {
 | 
			
		||||
      /* Convert RGB image to grayscale */
 | 
			
		||||
      GLubyte *indexImage = (GLubyte *) malloc( ImgWidth * ImgHeight );
 | 
			
		||||
      GLint i;
 | 
			
		||||
      for (i=0; i<ImgWidth*ImgHeight; i++) {
 | 
			
		||||
         int gray = Image[i*3] + Image[i*3+1] + Image[i*3+2];
 | 
			
		||||
         indexImage[i] = gray / 3;
 | 
			
		||||
      }
 | 
			
		||||
      free(Image);
 | 
			
		||||
      Image = indexImage;
 | 
			
		||||
      ImgFormat = GL_COLOR_INDEX;
 | 
			
		||||
 | 
			
		||||
      for (i=0;i<255;i++) {
 | 
			
		||||
         float g = i / 255.0;
 | 
			
		||||
         glutSetColor(i, g, g, g);
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   printf("Loaded %d by %d image\n", ImgWidth, ImgHeight );
 | 
			
		||||
 | 
			
		||||
   glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
 | 
			
		||||
   glPixelStorei(GL_UNPACK_ROW_LENGTH, ImgWidth);
 | 
			
		||||
   glPixelStorei(GL_PACK_ALIGNMENT, 1);
 | 
			
		||||
   glPixelStorei(GL_PACK_ROW_LENGTH, ImgWidth);
 | 
			
		||||
 | 
			
		||||
   Reset();
 | 
			
		||||
 | 
			
		||||
   TempImage = (GLubyte *) malloc(ImgWidth * ImgHeight * 4 * sizeof(GLubyte));
 | 
			
		||||
   assert(TempImage);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int
 | 
			
		||||
main( int argc, char *argv[] )
 | 
			
		||||
{
 | 
			
		||||
   GLboolean ciMode = GL_FALSE;
 | 
			
		||||
   if (argc > 1 && strcmp(argv[1], "-ci")==0) {
 | 
			
		||||
      ciMode = GL_TRUE;
 | 
			
		||||
   }
 | 
			
		||||
   glutInit( &argc, argv );
 | 
			
		||||
   glutInitWindowPosition( 0, 0 );
 | 
			
		||||
   glutInitWindowSize( 750, 250 );
 | 
			
		||||
   if (ciMode)
 | 
			
		||||
      glutInitDisplayMode( GLUT_INDEX | GLUT_DOUBLE );
 | 
			
		||||
   else
 | 
			
		||||
      glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
 | 
			
		||||
   glutCreateWindow(argv[0]);
 | 
			
		||||
   Init(ciMode);
 | 
			
		||||
   glutReshapeFunc( Reshape );
 | 
			
		||||
   glutKeyboardFunc( Key );
 | 
			
		||||
   glutDisplayFunc( Display );
 | 
			
		||||
   glutMainLoop();
 | 
			
		||||
   return 0;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: reflect.c,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
 | 
			
		||||
/* $Id: reflect.c,v 1.7 2001/04/25 15:51:32 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Demo of a reflective, texture-mapped surface with OpenGL.
 | 
			
		||||
@@ -20,70 +20,44 @@
 | 
			
		||||
 */
 | 
			
		||||
 
 | 
			
		||||
/*
 | 
			
		||||
 * Dirk Reiners (reiners@igd.fhg.de) made some modifications to this code.
 | 
			
		||||
 *
 | 
			
		||||
 * August 1996 - A few optimizations by Brian
 | 
			
		||||
 * Authors:
 | 
			
		||||
 *   Brian Paul
 | 
			
		||||
 *   Dirk Reiners (reiners@igd.fhg.de) made some modifications to this code.
 | 
			
		||||
 *   Mark Kilgard (April 1997)
 | 
			
		||||
 *   Brian Paul (April 2000 - added keyboard d/s options)
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * April, 1997 - Added Mark Kilgard's changes.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: reflect.c,v $
 | 
			
		||||
 * Revision 1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Initial revision
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.4  1999/03/28 18:22:05  brianp
 | 
			
		||||
 * minor clean-up
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.3  1998/11/22 02:54:29  brianp
 | 
			
		||||
 * only draw one stack for gluCylinders
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.2  1998/11/19 02:53:48  brianp
 | 
			
		||||
 * changed texture image and background color
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.1  1998/11/05 04:34:04  brianp
 | 
			
		||||
 * moved image files to ../images/ directory
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.0  1998/02/14 18:42:29  brianp
 | 
			
		||||
 * initial rev
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define USE_ZBUFFER
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* OK, without hardware support this is overkill. */
 | 
			
		||||
#define USE_TEXTURE
 | 
			
		||||
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include "GL/glut.h"
 | 
			
		||||
 | 
			
		||||
#include "../util/readtex.c"  /* a hack, I know */
 | 
			
		||||
#include "../util/showbuffer.c"
 | 
			
		||||
#include "../util/readtex.c"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define DEG2RAD (3.14159/180.0)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define TABLE_TEXTURE "../images/tile.rgb"
 | 
			
		||||
 | 
			
		||||
static int ImgWidth, ImgHeight;
 | 
			
		||||
static GLint ImgWidth, ImgHeight;
 | 
			
		||||
static GLenum ImgFormat;
 | 
			
		||||
static GLubyte *Image = NULL;
 | 
			
		||||
 | 
			
		||||
#define MAX_OBJECTS 2
 | 
			
		||||
 | 
			
		||||
static GLint table_list;
 | 
			
		||||
static GLint objects_list[MAX_OBJECTS];
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static GLfloat xrot, yrot;
 | 
			
		||||
static GLfloat spin;
 | 
			
		||||
 | 
			
		||||
static GLint Width = 400, Height = 300;
 | 
			
		||||
static GLenum ShowBuffer = GL_NONE;
 | 
			
		||||
static GLboolean Anim = GL_TRUE;
 | 
			
		||||
 | 
			
		||||
/* performance info */
 | 
			
		||||
static GLint T0 = 0;
 | 
			
		||||
static GLint Frames = 0;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void make_table( void )
 | 
			
		||||
@@ -146,16 +120,11 @@ static void make_objects( void )
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static GLfloat light_pos[] = { 0.0, 20.0, 0.0, 1.0 };
 | 
			
		||||
 | 
			
		||||
static void init( void )
 | 
			
		||||
{
 | 
			
		||||
   make_table();
 | 
			
		||||
   make_objects();
 | 
			
		||||
 | 
			
		||||
   /* Setup texture */
 | 
			
		||||
#ifdef USE_TEXTURE
 | 
			
		||||
 | 
			
		||||
   Image = LoadRGBImage( TABLE_TEXTURE, &ImgWidth, &ImgHeight, &ImgFormat );
 | 
			
		||||
   if (!Image) {
 | 
			
		||||
      printf("Couldn't read %s\n", TABLE_TEXTURE);
 | 
			
		||||
@@ -169,23 +138,17 @@ static void init( void )
 | 
			
		||||
   glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT );
 | 
			
		||||
   glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
 | 
			
		||||
   glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   xrot = 30.0;
 | 
			
		||||
   yrot = 50.0;
 | 
			
		||||
   spin = 0.0;
 | 
			
		||||
 | 
			
		||||
#ifndef USE_ZBUFFER
 | 
			
		||||
   glEnable( GL_CULL_FACE );
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   glShadeModel( GL_FLAT );
 | 
			
		||||
   
 | 
			
		||||
   glEnable( GL_LIGHT0 );
 | 
			
		||||
   glEnable( GL_LIGHTING );
 | 
			
		||||
 | 
			
		||||
   glClearColor( 0.5, 0.5, 0.9, 1.0 );
 | 
			
		||||
   glClearColor( 0.5, 0.5, 0.9, 0.0 );
 | 
			
		||||
 | 
			
		||||
   glEnable( GL_NORMALIZE );
 | 
			
		||||
}
 | 
			
		||||
@@ -194,12 +157,14 @@ static void init( void )
 | 
			
		||||
 | 
			
		||||
static void reshape(int w, int h)
 | 
			
		||||
{
 | 
			
		||||
   GLfloat aspect = (float) w / (float) h;
 | 
			
		||||
 | 
			
		||||
   GLfloat yAspect = 2.5;
 | 
			
		||||
   GLfloat xAspect = yAspect * (float) w / (float) h;
 | 
			
		||||
   Width = w;
 | 
			
		||||
   Height = h;
 | 
			
		||||
   glViewport(0, 0, w, h);
 | 
			
		||||
   glMatrixMode(GL_PROJECTION);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glFrustum( -aspect, aspect, -1.0, 1.0, 4.0, 300.0 );
 | 
			
		||||
   glFrustum( -xAspect, xAspect, -yAspect, yAspect, 10.0, 30.0 );
 | 
			
		||||
   glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
}
 | 
			
		||||
@@ -212,8 +177,7 @@ static void draw_objects( GLfloat eyex, GLfloat eyey, GLfloat eyez )
 | 
			
		||||
   (void) eyey;
 | 
			
		||||
   (void) eyez;
 | 
			
		||||
#ifndef USE_ZBUFFER
 | 
			
		||||
	if (eyex<0.5)
 | 
			
		||||
	{
 | 
			
		||||
   if (eyex<0.5) {
 | 
			
		||||
#endif
 | 
			
		||||
	   glPushMatrix();
 | 
			
		||||
	   glTranslatef( 1.0, 1.5, 0.0 );
 | 
			
		||||
@@ -230,9 +194,8 @@ static void draw_objects( GLfloat eyex, GLfloat eyey, GLfloat eyez )
 | 
			
		||||
	   glCallList( objects_list[1] );
 | 
			
		||||
	   glPopMatrix();
 | 
			
		||||
#ifndef USE_ZBUFFER
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	{	
 | 
			
		||||
   }
 | 
			
		||||
   else {	
 | 
			
		||||
	   glPushMatrix();
 | 
			
		||||
	   glTranslatef( -1.0, 0.85+3.0*fabs( cos(0.01*spin) ), 0.0 );
 | 
			
		||||
	   glRotatef( 0.5*spin, 0.0, 0.5, 1.0 );
 | 
			
		||||
@@ -247,7 +210,7 @@ static void draw_objects( GLfloat eyex, GLfloat eyey, GLfloat eyez )
 | 
			
		||||
	   glRotatef( 0.5*spin, 0.0, 0.5, 1.0 );
 | 
			
		||||
	   glCallList( objects_list[0] );
 | 
			
		||||
	   glPopMatrix();
 | 
			
		||||
	}
 | 
			
		||||
   }
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -262,6 +225,7 @@ static void draw_table( void )
 | 
			
		||||
 | 
			
		||||
static void draw_scene( void )
 | 
			
		||||
{
 | 
			
		||||
   static GLfloat light_pos[] = { 0.0, 20.0, 0.0, 1.0 };
 | 
			
		||||
   GLfloat dist = 20.0;
 | 
			
		||||
   GLfloat eyex, eyey, eyez;
 | 
			
		||||
 | 
			
		||||
@@ -279,20 +243,15 @@ static void draw_scene( void )
 | 
			
		||||
   glLightfv( GL_LIGHT0, GL_POSITION, light_pos );
 | 
			
		||||
 
 | 
			
		||||
   /* draw table into stencil planes */
 | 
			
		||||
   glEnable( GL_STENCIL_TEST );
 | 
			
		||||
#ifdef USE_ZBUFFER
 | 
			
		||||
   glDisable( GL_DEPTH_TEST );
 | 
			
		||||
#endif
 | 
			
		||||
   glEnable( GL_STENCIL_TEST );
 | 
			
		||||
   glStencilFunc( GL_ALWAYS, 1, 0xffffffff );
 | 
			
		||||
   glStencilOp( GL_REPLACE, GL_REPLACE, GL_REPLACE );
 | 
			
		||||
   glColorMask( GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE );
 | 
			
		||||
   draw_table();
 | 
			
		||||
   glColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE );
 | 
			
		||||
 | 
			
		||||
#ifdef USE_ZBUFFER
 | 
			
		||||
   glEnable( GL_DEPTH_TEST );
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   /* render view from below (reflected viewport) */
 | 
			
		||||
   /* only draw where stencil==1 */
 | 
			
		||||
@@ -318,9 +277,7 @@ static void draw_scene( void )
 | 
			
		||||
   glEnable( GL_BLEND );
 | 
			
		||||
   glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
 | 
			
		||||
 | 
			
		||||
#ifdef USE_TEXTURE
 | 
			
		||||
   glEnable( GL_TEXTURE_2D );
 | 
			
		||||
#endif
 | 
			
		||||
   draw_table();
 | 
			
		||||
   glDisable( GL_TEXTURE_2D );
 | 
			
		||||
   glDisable( GL_BLEND );
 | 
			
		||||
@@ -334,43 +291,67 @@ static void draw_scene( void )
 | 
			
		||||
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
 | 
			
		||||
   if (ShowBuffer == GL_DEPTH) {
 | 
			
		||||
      ShowDepthBuffer(Width, Height, 1.0, 0.0);
 | 
			
		||||
   }
 | 
			
		||||
   else if (ShowBuffer == GL_STENCIL) {
 | 
			
		||||
      ShowStencilBuffer(Width, Height, 255.0, 0.0);
 | 
			
		||||
   }
 | 
			
		||||
   else if (ShowBuffer == GL_ALPHA) {
 | 
			
		||||
      ShowAlphaBuffer(Width, Height);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glutSwapBuffers();
 | 
			
		||||
 | 
			
		||||
   {
 | 
			
		||||
      GLint t = glutGet(GLUT_ELAPSED_TIME);
 | 
			
		||||
      Frames++;
 | 
			
		||||
      if (t - T0 >= 5000) {
 | 
			
		||||
         GLfloat seconds = (t - T0) / 1000.0;
 | 
			
		||||
         GLfloat fps = Frames / seconds;
 | 
			
		||||
         printf("%d frames in %g seconds = %g FPS\n", Frames, seconds, fps);
 | 
			
		||||
         T0 = t;
 | 
			
		||||
         Frames = 0;
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if 0
 | 
			
		||||
void draw_scene(void)
 | 
			
		||||
static void idle( void )
 | 
			
		||||
{
 | 
			
		||||
   GLfloat dist = 20.0;
 | 
			
		||||
   GLfloat eyex, eyey, eyez;
 | 
			
		||||
 | 
			
		||||
   glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   eyex = dist * cos(yrot*DEG2RAD) * cos(xrot*DEG2RAD);
 | 
			
		||||
   eyez = dist * sin(yrot*DEG2RAD) * cos(xrot*DEG2RAD);
 | 
			
		||||
   eyey = dist * sin(xrot*DEG2RAD);
 | 
			
		||||
 | 
			
		||||
   /* view from top */
 | 
			
		||||
   glPushMatrix();
 | 
			
		||||
   gluLookAt( eyex, eyey, eyez, 0.0, 0.0, 0.0,  0.0, 1.0, 0.0 );
 | 
			
		||||
 | 
			
		||||
   draw_table();
 | 
			
		||||
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
 | 
			
		||||
   glutSwapBuffers();
 | 
			
		||||
   spin += 2.0;
 | 
			
		||||
   yrot += 3.0;
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void Key( unsigned char key, int x, int y )
 | 
			
		||||
{
 | 
			
		||||
   (void) x;
 | 
			
		||||
   (void) y;
 | 
			
		||||
   if (key==27)
 | 
			
		||||
   if (key == 'd') {
 | 
			
		||||
      ShowBuffer = GL_DEPTH;
 | 
			
		||||
   }
 | 
			
		||||
   else if (key == 's') {
 | 
			
		||||
      ShowBuffer = GL_STENCIL;
 | 
			
		||||
   }
 | 
			
		||||
   else if (key == 'a') {
 | 
			
		||||
      ShowBuffer = GL_ALPHA;
 | 
			
		||||
   }
 | 
			
		||||
   else if (key == ' ') {
 | 
			
		||||
      Anim = !Anim;
 | 
			
		||||
      if (Anim)
 | 
			
		||||
         glutIdleFunc(idle);
 | 
			
		||||
      else
 | 
			
		||||
         glutIdleFunc(NULL);
 | 
			
		||||
   }
 | 
			
		||||
   else if (key==27) {
 | 
			
		||||
      exit(0);
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      ShowBuffer = GL_NONE;
 | 
			
		||||
   }
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -381,15 +362,13 @@ static void SpecialKey( int key, int x, int y )
 | 
			
		||||
   switch (key) {
 | 
			
		||||
      case GLUT_KEY_UP:
 | 
			
		||||
         xrot += 3.0;
 | 
			
		||||
#ifndef USE_ZBUFFER
 | 
			
		||||
		 if ( xrot > 180 )	xrot = 180;
 | 
			
		||||
#endif
 | 
			
		||||
         if ( xrot > 85 )
 | 
			
		||||
            xrot = 85;
 | 
			
		||||
         break;
 | 
			
		||||
      case GLUT_KEY_DOWN:
 | 
			
		||||
         xrot -= 3.0;
 | 
			
		||||
#ifndef USE_ZBUFFER
 | 
			
		||||
		 if ( xrot < 0 )	xrot = 0;
 | 
			
		||||
#endif
 | 
			
		||||
         if ( xrot < 5 )
 | 
			
		||||
            xrot = 5;
 | 
			
		||||
         break;
 | 
			
		||||
      case GLUT_KEY_LEFT:
 | 
			
		||||
         yrot += 3.0;
 | 
			
		||||
@@ -402,34 +381,19 @@ static void SpecialKey( int key, int x, int y )
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void idle( void )
 | 
			
		||||
{
 | 
			
		||||
   spin += 2.0;
 | 
			
		||||
   yrot += 3.0;
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int main( int argc, char *argv[] )
 | 
			
		||||
{
 | 
			
		||||
   glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB 
 | 
			
		||||
#ifdef USE_ZBUFFER
 | 
			
		||||
		| GLUT_DEPTH 
 | 
			
		||||
#endif
 | 
			
		||||
		| GLUT_STENCIL);
 | 
			
		||||
   glutInit(&argc, argv);
 | 
			
		||||
   glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH | GLUT_STENCIL);
 | 
			
		||||
   glutInitWindowPosition( 0, 0 );
 | 
			
		||||
   glutInitWindowSize(400, 300 );
 | 
			
		||||
   glutInitWindowSize( Width, Height );
 | 
			
		||||
   glutCreateWindow(argv[0]);
 | 
			
		||||
   glutReshapeFunc(reshape);
 | 
			
		||||
   glutDisplayFunc(draw_scene);
 | 
			
		||||
   glutKeyboardFunc(Key);
 | 
			
		||||
   glutSpecialFunc(SpecialKey);
 | 
			
		||||
   glutIdleFunc(idle);
 | 
			
		||||
 | 
			
		||||
   init();
 | 
			
		||||
 | 
			
		||||
   glutMainLoop();
 | 
			
		||||
   return 0;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										528
									
								
								progs/demos/shadowtex.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										528
									
								
								progs/demos/shadowtex.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,528 @@
 | 
			
		||||
/* $Id: shadowtex.c,v 1.4.2.1 2002/07/12 15:50:46 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Shadow demo using the GL_SGIX_depth_texture, GL_SGIX_shadow and
 | 
			
		||||
 * GL_SGIX_shadow_ambient extensions.
 | 
			
		||||
 *
 | 
			
		||||
 * Brian Paul
 | 
			
		||||
 * 19 Feb 2001
 | 
			
		||||
 *
 | 
			
		||||
 * Copyright (C) 1999-2001  Brian Paul   All Rights Reserved.
 | 
			
		||||
 *
 | 
			
		||||
 * Permission is hereby granted, free of charge, to any person obtaining a
 | 
			
		||||
 * copy of this software and associated documentation files (the "Software"),
 | 
			
		||||
 * to deal in the Software without restriction, including without limitation
 | 
			
		||||
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 | 
			
		||||
 * and/or sell copies of the Software, and to permit persons to whom the
 | 
			
		||||
 * Software is furnished to do so, subject to the following conditions:
 | 
			
		||||
 *
 | 
			
		||||
 * The above copyright notice and this permission notice shall be included
 | 
			
		||||
 * in all copies or substantial portions of the Software.
 | 
			
		||||
 *
 | 
			
		||||
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 | 
			
		||||
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
			
		||||
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 | 
			
		||||
 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
 | 
			
		||||
 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 | 
			
		||||
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <assert.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
#include "../util/showbuffer.c"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define DEG_TO_RAD (3.14159 / 180.0)
 | 
			
		||||
 | 
			
		||||
static GLint WindowWidth = 450, WindowHeight = 300;
 | 
			
		||||
static GLfloat Xrot = 15, Yrot = 0, Zrot = 0;
 | 
			
		||||
 | 
			
		||||
static GLfloat Red[4] = {1, 0, 0, 1};
 | 
			
		||||
static GLfloat Green[4] = {0, 1, 0, 1};
 | 
			
		||||
static GLfloat Blue[4] = {0, 0, 1, 1};
 | 
			
		||||
static GLfloat Yellow[4] = {1, 1, 0, 1};
 | 
			
		||||
 | 
			
		||||
static GLfloat LightDist = 10;
 | 
			
		||||
static GLfloat LightLatitude = 45.0;
 | 
			
		||||
static GLfloat LightLongitude = 45.0;
 | 
			
		||||
static GLfloat LightPos[4];
 | 
			
		||||
static GLfloat SpotDir[3];
 | 
			
		||||
static GLfloat SpotAngle = 40.0 * DEG_TO_RAD;
 | 
			
		||||
static GLfloat ShadowNear = 4.0, ShadowFar = 24.0;
 | 
			
		||||
static GLint ShadowTexWidth = 256, ShadowTexHeight = 256;
 | 
			
		||||
 | 
			
		||||
static GLboolean LinearFilter = GL_FALSE;
 | 
			
		||||
 | 
			
		||||
static GLfloat Bias = -0.06;
 | 
			
		||||
 | 
			
		||||
static GLboolean Anim = GL_TRUE;
 | 
			
		||||
 | 
			
		||||
static GLuint DisplayMode;
 | 
			
		||||
#define SHOW_NORMAL         0
 | 
			
		||||
#define SHOW_DEPTH_IMAGE    1
 | 
			
		||||
#define SHOW_DEPTH_MAPPING  2
 | 
			
		||||
#define SHOW_DISTANCE       3
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
DrawScene(void)
 | 
			
		||||
{
 | 
			
		||||
   GLfloat k = 6;
 | 
			
		||||
   /* sphere */
 | 
			
		||||
   glPushMatrix();
 | 
			
		||||
   glTranslatef(1.6, 2.2, 2.7);
 | 
			
		||||
   glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, Green);
 | 
			
		||||
   glColor4fv(Green);
 | 
			
		||||
   glutSolidSphere(1.5, 15, 15);
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
   /* dodecahedron */
 | 
			
		||||
   glPushMatrix();
 | 
			
		||||
   glTranslatef(-2.0, 1.2, 2.1);
 | 
			
		||||
   glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, Red);
 | 
			
		||||
   glColor4fv(Red);
 | 
			
		||||
   glutSolidDodecahedron();
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
   /* icosahedron */
 | 
			
		||||
   glPushMatrix();
 | 
			
		||||
   glTranslatef(-0.6, 1.3, -0.5);
 | 
			
		||||
   glScalef(1.5, 1.5, 1.5);
 | 
			
		||||
   glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, Yellow);
 | 
			
		||||
   glColor4fv(Red);
 | 
			
		||||
   glutSolidIcosahedron();
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
   /* a plane */
 | 
			
		||||
   glPushMatrix();
 | 
			
		||||
   glTranslatef(0, -1.1, 0);
 | 
			
		||||
   glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, Blue);
 | 
			
		||||
   glColor4fv(Blue);
 | 
			
		||||
   glNormal3f(0, 1, 0);
 | 
			
		||||
   glBegin(GL_POLYGON);
 | 
			
		||||
   glVertex3f(-k, 0, -k);
 | 
			
		||||
   glVertex3f( k, 0, -k);
 | 
			
		||||
   glVertex3f( k, 0,  k);
 | 
			
		||||
   glVertex3f(-k, 0,  k);
 | 
			
		||||
   glEnd();
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Load the GL_TEXTURE matrix with the projection from the light
 | 
			
		||||
 * source's point of view.
 | 
			
		||||
 */
 | 
			
		||||
static void
 | 
			
		||||
MakeShadowMatrix(const GLfloat lightPos[4], const GLfloat spotDir[3],
 | 
			
		||||
                 GLfloat spotAngle, GLfloat shadowNear, GLfloat shadowFar)
 | 
			
		||||
{
 | 
			
		||||
   GLfloat d;
 | 
			
		||||
   
 | 
			
		||||
   glMatrixMode(GL_TEXTURE);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glTranslatef(0.5, 0.5, 0.5 + Bias);
 | 
			
		||||
   glScalef(0.5, 0.5, 0.5);
 | 
			
		||||
   d = shadowNear * tan(spotAngle);
 | 
			
		||||
   glFrustum(-d, d, -d, d, shadowNear, shadowFar);
 | 
			
		||||
   gluLookAt(lightPos[0], lightPos[1], lightPos[2],
 | 
			
		||||
             lightPos[0] + spotDir[0],
 | 
			
		||||
             lightPos[1] + spotDir[1],
 | 
			
		||||
             lightPos[2] + spotDir[2],
 | 
			
		||||
             0, 1, 0);
 | 
			
		||||
   glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
EnableIdentityTexgen(void)
 | 
			
		||||
{
 | 
			
		||||
   /* texgen so that texcoord = vertex coord */
 | 
			
		||||
   static GLfloat sPlane[4] = { 1, 0, 0, 0 };
 | 
			
		||||
   static GLfloat tPlane[4] = { 0, 1, 0, 0 };
 | 
			
		||||
   static GLfloat rPlane[4] = { 0, 0, 1, 0 };
 | 
			
		||||
   static GLfloat qPlane[4] = { 0, 0, 0, 1 };
 | 
			
		||||
 | 
			
		||||
   glTexGenfv(GL_S, GL_EYE_PLANE, sPlane);
 | 
			
		||||
   glTexGenfv(GL_T, GL_EYE_PLANE, tPlane);
 | 
			
		||||
   glTexGenfv(GL_R, GL_EYE_PLANE, rPlane);
 | 
			
		||||
   glTexGenfv(GL_Q, GL_EYE_PLANE, qPlane);
 | 
			
		||||
   glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
 | 
			
		||||
   glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
 | 
			
		||||
   glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
 | 
			
		||||
   glTexGeni(GL_Q, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
 | 
			
		||||
 | 
			
		||||
   glEnable(GL_TEXTURE_GEN_S);
 | 
			
		||||
   glEnable(GL_TEXTURE_GEN_T);
 | 
			
		||||
   glEnable(GL_TEXTURE_GEN_R);
 | 
			
		||||
   glEnable(GL_TEXTURE_GEN_Q);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Setup 1-D texgen so that the distance from the light source, between
 | 
			
		||||
 * the near and far planes maps to s=0 and s=1.  When we draw the scene,
 | 
			
		||||
 * the grayness will indicate the fragment's distance from the light
 | 
			
		||||
 * source.
 | 
			
		||||
 */
 | 
			
		||||
static void
 | 
			
		||||
EnableDistanceTexgen(const GLfloat lightPos[4], const GLfloat lightDir[3],
 | 
			
		||||
                     GLfloat lightNear, GLfloat lightFar)
 | 
			
		||||
{
 | 
			
		||||
   GLfloat m, d;
 | 
			
		||||
   GLfloat sPlane[4];
 | 
			
		||||
   GLfloat nearPoint[3];
 | 
			
		||||
 | 
			
		||||
   m = sqrt(lightDir[0] * lightDir[0] +
 | 
			
		||||
            lightDir[1] * lightDir[1] +
 | 
			
		||||
            lightDir[2] * lightDir[2]);
 | 
			
		||||
 | 
			
		||||
   d = lightFar - lightNear;
 | 
			
		||||
 | 
			
		||||
   /* nearPoint = point on light direction vector which intersects the
 | 
			
		||||
    * near plane of the light frustum.
 | 
			
		||||
    */
 | 
			
		||||
   nearPoint[0] = LightPos[0] + lightDir[0] / m * lightNear;
 | 
			
		||||
   nearPoint[1] = LightPos[1] + lightDir[1] / m * lightNear;
 | 
			
		||||
   nearPoint[2] = LightPos[2] + lightDir[2] / m * lightNear;
 | 
			
		||||
 | 
			
		||||
   sPlane[0] = lightDir[0] / d / m;
 | 
			
		||||
   sPlane[1] = lightDir[1] / d / m;
 | 
			
		||||
   sPlane[2] = lightDir[2] / d / m;
 | 
			
		||||
   sPlane[3] = -(sPlane[0] * nearPoint[0]
 | 
			
		||||
               + sPlane[1] * nearPoint[1]
 | 
			
		||||
               + sPlane[2] * nearPoint[2]);
 | 
			
		||||
 | 
			
		||||
   glTexGenfv(GL_S, GL_EYE_PLANE, sPlane);
 | 
			
		||||
   glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
 | 
			
		||||
   glEnable(GL_TEXTURE_GEN_S);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
DisableTexgen(void)
 | 
			
		||||
{
 | 
			
		||||
   glDisable(GL_TEXTURE_GEN_S);
 | 
			
		||||
   glDisable(GL_TEXTURE_GEN_T);
 | 
			
		||||
   glDisable(GL_TEXTURE_GEN_R);
 | 
			
		||||
   glDisable(GL_TEXTURE_GEN_Q);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
ComputeLightPos(GLfloat dist, GLfloat latitude, GLfloat longitude,
 | 
			
		||||
                GLfloat pos[4], GLfloat dir[3])
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
   pos[0] = dist * sin(longitude * DEG_TO_RAD);
 | 
			
		||||
   pos[1] = dist * sin(latitude * DEG_TO_RAD);
 | 
			
		||||
   pos[2] = dist * cos(latitude * DEG_TO_RAD) * cos(longitude * DEG_TO_RAD);
 | 
			
		||||
   pos[3] = 1;
 | 
			
		||||
   dir[0] = -pos[0];
 | 
			
		||||
   dir[1] = -pos[1];
 | 
			
		||||
   dir[2] = -pos[2];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
Display(void)
 | 
			
		||||
{
 | 
			
		||||
   GLfloat ar = (GLfloat) WindowWidth / (GLfloat) WindowHeight;
 | 
			
		||||
   GLfloat d;
 | 
			
		||||
 | 
			
		||||
   ComputeLightPos(LightDist, LightLatitude, LightLongitude,
 | 
			
		||||
                   LightPos, SpotDir);
 | 
			
		||||
   /*
 | 
			
		||||
    * Step 1: render scene from point of view of the light source
 | 
			
		||||
    */
 | 
			
		||||
   /* compute frustum to enclose spot light cone */
 | 
			
		||||
   d = ShadowNear * tan(SpotAngle);
 | 
			
		||||
   glMatrixMode(GL_PROJECTION);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glFrustum(-d, d, -d, d, ShadowNear, ShadowFar);
 | 
			
		||||
   glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   gluLookAt(LightPos[0], LightPos[1], LightPos[2], /* from */
 | 
			
		||||
             0, 0, 0, /* target */
 | 
			
		||||
             0, 1, 0); /* up */
 | 
			
		||||
 | 
			
		||||
   glViewport(0, 0, ShadowTexWidth, ShadowTexHeight);
 | 
			
		||||
   glClear(GL_DEPTH_BUFFER_BIT);
 | 
			
		||||
   DrawScene();
 | 
			
		||||
 | 
			
		||||
   /*
 | 
			
		||||
    * Step 2: copy depth buffer into texture map
 | 
			
		||||
    */
 | 
			
		||||
   if (DisplayMode == SHOW_DEPTH_MAPPING) {
 | 
			
		||||
      /* load depth image as gray-scale luminance texture */
 | 
			
		||||
      GLfloat *depth = (GLfloat *) malloc(ShadowTexWidth * ShadowTexHeight
 | 
			
		||||
                                          * sizeof(GLfloat));
 | 
			
		||||
      if (depth) {
 | 
			
		||||
         glReadPixels(0, 0, ShadowTexWidth, ShadowTexHeight,
 | 
			
		||||
                      GL_DEPTH_COMPONENT, GL_FLOAT, depth);
 | 
			
		||||
         glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE,
 | 
			
		||||
                      ShadowTexWidth, ShadowTexHeight, 0,
 | 
			
		||||
                      GL_LUMINANCE, GL_FLOAT, depth);
 | 
			
		||||
         free(depth);
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      /* The normal shadow case */
 | 
			
		||||
      glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT,
 | 
			
		||||
                       0, 0, ShadowTexWidth, ShadowTexHeight, 0);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   /*
 | 
			
		||||
    * Step 3: render scene from point of view of the camera
 | 
			
		||||
    */
 | 
			
		||||
   glViewport(0, 0, WindowWidth, WindowHeight);
 | 
			
		||||
   if (DisplayMode == SHOW_DEPTH_IMAGE) {
 | 
			
		||||
      ShowDepthBuffer(WindowWidth, WindowHeight, 0, 1);
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      glMatrixMode(GL_PROJECTION);
 | 
			
		||||
      glLoadIdentity();
 | 
			
		||||
      glFrustum(-ar, ar, -1.0, 1.0, 4.0, 50.0);
 | 
			
		||||
      glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
      glLoadIdentity();
 | 
			
		||||
      glTranslatef(0.0, 0.0, -22.0);
 | 
			
		||||
      glRotatef(Xrot, 1, 0, 0);
 | 
			
		||||
      glRotatef(Yrot, 0, 1, 0);
 | 
			
		||||
      glRotatef(Zrot, 0, 0, 1);
 | 
			
		||||
      glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 | 
			
		||||
      glLightfv(GL_LIGHT0, GL_POSITION, LightPos);
 | 
			
		||||
      if (LinearFilter) {
 | 
			
		||||
         glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
 | 
			
		||||
         glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
         glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
 | 
			
		||||
         glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
 | 
			
		||||
      }
 | 
			
		||||
      if (DisplayMode == SHOW_DEPTH_MAPPING) {
 | 
			
		||||
         glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_SGIX, GL_FALSE);
 | 
			
		||||
         glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
 | 
			
		||||
         glEnable(GL_TEXTURE_2D);
 | 
			
		||||
         MakeShadowMatrix(LightPos, SpotDir, SpotAngle, ShadowNear, ShadowFar);
 | 
			
		||||
         EnableIdentityTexgen();
 | 
			
		||||
      }
 | 
			
		||||
      else if (DisplayMode == SHOW_DISTANCE) {
 | 
			
		||||
         glMatrixMode(GL_TEXTURE);
 | 
			
		||||
         glLoadIdentity();
 | 
			
		||||
         glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
         EnableDistanceTexgen(LightPos, SpotDir, ShadowNear+Bias, ShadowFar);
 | 
			
		||||
         glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
 | 
			
		||||
         glEnable(GL_TEXTURE_1D);
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
         assert(DisplayMode == SHOW_NORMAL);
 | 
			
		||||
         glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_SGIX, GL_TRUE);
 | 
			
		||||
         glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
 | 
			
		||||
         glEnable(GL_TEXTURE_2D);
 | 
			
		||||
         MakeShadowMatrix(LightPos, SpotDir, SpotAngle, ShadowNear, ShadowFar);
 | 
			
		||||
         EnableIdentityTexgen();
 | 
			
		||||
      }
 | 
			
		||||
      DrawScene();
 | 
			
		||||
      DisableTexgen();
 | 
			
		||||
      glDisable(GL_TEXTURE_1D);
 | 
			
		||||
      glDisable(GL_TEXTURE_2D);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glutSwapBuffers();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
Reshape(int width, int height)
 | 
			
		||||
{
 | 
			
		||||
   WindowWidth = width;
 | 
			
		||||
   WindowHeight = height;
 | 
			
		||||
   if (width >= 512 && height >= 512) {
 | 
			
		||||
      ShadowTexWidth = ShadowTexHeight = 512;
 | 
			
		||||
   }
 | 
			
		||||
   else if (width >= 256 && height >= 256) {
 | 
			
		||||
      ShadowTexWidth = ShadowTexHeight = 256;
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      ShadowTexWidth = ShadowTexHeight = 128;
 | 
			
		||||
   }
 | 
			
		||||
   printf("Using %d x %d depth texture\n", ShadowTexWidth, ShadowTexHeight);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
Idle(void)
 | 
			
		||||
{
 | 
			
		||||
   Yrot += 5.0;
 | 
			
		||||
   /*LightLongitude -= 5.0;*/
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
Key(unsigned char key, int x, int y)
 | 
			
		||||
{
 | 
			
		||||
   const GLfloat step = 3.0;
 | 
			
		||||
   (void) x;
 | 
			
		||||
   (void) y;
 | 
			
		||||
   switch (key) {
 | 
			
		||||
      case 'a':
 | 
			
		||||
         Anim = !Anim;
 | 
			
		||||
         if (Anim)
 | 
			
		||||
            glutIdleFunc(Idle);
 | 
			
		||||
         else
 | 
			
		||||
            glutIdleFunc(NULL);
 | 
			
		||||
         break;
 | 
			
		||||
      case 'b':
 | 
			
		||||
         Bias -= 0.01;
 | 
			
		||||
         printf("Bias %g\n", Bias);
 | 
			
		||||
         break;
 | 
			
		||||
      case 'B':
 | 
			
		||||
         Bias += 0.01;
 | 
			
		||||
         printf("Bias %g\n", Bias);
 | 
			
		||||
         break;
 | 
			
		||||
      case 'd':
 | 
			
		||||
         DisplayMode = SHOW_DISTANCE;
 | 
			
		||||
         break;
 | 
			
		||||
      case 'f':
 | 
			
		||||
         LinearFilter = !LinearFilter;
 | 
			
		||||
         printf("%s filtering\n", LinearFilter ? "Bilinear" : "Nearest");
 | 
			
		||||
         break;
 | 
			
		||||
      case 'i':
 | 
			
		||||
         DisplayMode = SHOW_DEPTH_IMAGE;
 | 
			
		||||
         break;
 | 
			
		||||
      case 'm':
 | 
			
		||||
         DisplayMode = SHOW_DEPTH_MAPPING;
 | 
			
		||||
         break;
 | 
			
		||||
      case 'n':
 | 
			
		||||
      case ' ':
 | 
			
		||||
         DisplayMode = SHOW_NORMAL;
 | 
			
		||||
         break;
 | 
			
		||||
      case 'z':
 | 
			
		||||
         Zrot -= step;
 | 
			
		||||
         break;
 | 
			
		||||
      case 'Z':
 | 
			
		||||
         Zrot += step;
 | 
			
		||||
         break;
 | 
			
		||||
      case 27:
 | 
			
		||||
         exit(0);
 | 
			
		||||
         break;
 | 
			
		||||
   }
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
SpecialKey(int key, int x, int y)
 | 
			
		||||
{
 | 
			
		||||
   const GLfloat step = 3.0;
 | 
			
		||||
   const int mod = glutGetModifiers();
 | 
			
		||||
   (void) x;
 | 
			
		||||
   (void) y;
 | 
			
		||||
   switch (key) {
 | 
			
		||||
      case GLUT_KEY_UP:
 | 
			
		||||
         if (mod)
 | 
			
		||||
            LightLatitude += step;
 | 
			
		||||
         else
 | 
			
		||||
            Xrot += step;
 | 
			
		||||
         break;
 | 
			
		||||
      case GLUT_KEY_DOWN:
 | 
			
		||||
         if (mod)
 | 
			
		||||
            LightLatitude -= step;
 | 
			
		||||
         else
 | 
			
		||||
            Xrot -= step;
 | 
			
		||||
         break;
 | 
			
		||||
      case GLUT_KEY_LEFT:
 | 
			
		||||
         if (mod)
 | 
			
		||||
            LightLongitude += step;
 | 
			
		||||
         else
 | 
			
		||||
            Yrot += step;
 | 
			
		||||
         break;
 | 
			
		||||
      case GLUT_KEY_RIGHT:
 | 
			
		||||
         if (mod)
 | 
			
		||||
            LightLongitude -= step;
 | 
			
		||||
         else
 | 
			
		||||
            Yrot -= step;
 | 
			
		||||
         break;
 | 
			
		||||
   }
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
Init(void)
 | 
			
		||||
{
 | 
			
		||||
   if (!glutExtensionSupported("GL_SGIX_depth_texture") ||
 | 
			
		||||
       !glutExtensionSupported("GL_SGIX_shadow")) {
 | 
			
		||||
      printf("Sorry, this demo requires the GL_SGIX_depth_texture and GL_SGIX_shadow extensions\n");
 | 
			
		||||
      exit(1);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_T, GL_CLAMP);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
 | 
			
		||||
#ifdef GL_SGIX_shadow
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_OPERATOR_SGIX,
 | 
			
		||||
                   GL_TEXTURE_LEQUAL_R_SGIX);
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef GL_SGIX_shadow_ambient
 | 
			
		||||
   if (glutExtensionSupported("GL_SGIX_shadow_ambient"))
 | 
			
		||||
      glTexParameterf(GL_TEXTURE_2D, GL_SHADOW_AMBIENT_SGIX, 0.3);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* setup 1-D grayscale texture image for SHOW_DISTANCE mode */
 | 
			
		||||
   {
 | 
			
		||||
      GLuint i;
 | 
			
		||||
      GLubyte image[256];
 | 
			
		||||
      for (i = 0; i < 256; i++)
 | 
			
		||||
         image[i] = i;
 | 
			
		||||
      glTexImage1D(GL_TEXTURE_1D, 0, GL_LUMINANCE,
 | 
			
		||||
                   256, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, image);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glEnable(GL_DEPTH_TEST);
 | 
			
		||||
   glEnable(GL_LIGHTING);
 | 
			
		||||
   glEnable(GL_LIGHT0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
PrintHelp(void)
 | 
			
		||||
{
 | 
			
		||||
   printf("Keys:\n");
 | 
			
		||||
   printf("  a = toggle animation\n");
 | 
			
		||||
   printf("  i = show depth texture image\n");
 | 
			
		||||
   printf("  m = show depth texture mapping\n");
 | 
			
		||||
   printf("  d = show fragment distance from light source\n");
 | 
			
		||||
   printf("  n = show normal, shadowed image\n");
 | 
			
		||||
   printf("  f = toggle nearest/bilinear texture filtering\n");
 | 
			
		||||
   printf("  b/B = decrease/increase shadow map Z bias\n");
 | 
			
		||||
   printf("  cursor keys = rotate scene\n");
 | 
			
		||||
   printf("  <shift> + cursor keys = rotate light source\n");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int
 | 
			
		||||
main(int argc, char *argv[])
 | 
			
		||||
{
 | 
			
		||||
   glutInit(&argc, argv);
 | 
			
		||||
   glutInitWindowPosition(0, 0);
 | 
			
		||||
   glutInitWindowSize(WindowWidth, WindowHeight);
 | 
			
		||||
   glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
 | 
			
		||||
   glutCreateWindow(argv[0]);
 | 
			
		||||
   glutReshapeFunc(Reshape);
 | 
			
		||||
   glutKeyboardFunc(Key);
 | 
			
		||||
   glutSpecialFunc(SpecialKey);
 | 
			
		||||
   glutDisplayFunc(Display);
 | 
			
		||||
   if (Anim)
 | 
			
		||||
      glutIdleFunc(Idle);
 | 
			
		||||
   Init();
 | 
			
		||||
   PrintHelp();
 | 
			
		||||
   glutMainLoop();
 | 
			
		||||
   return 0;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: stex3d.c,v 1.2 1999/09/17 12:27:01 brianp Exp $ */
 | 
			
		||||
/* $Id: stex3d.c,v 1.5 2000/06/27 17:04:43 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*----------------------------- 
 | 
			
		||||
 * stex3d.c GL example of the mesa 3d-texture extention to simulate procedural
 | 
			
		||||
@@ -17,6 +17,15 @@
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: stex3d.c,v $
 | 
			
		||||
 * Revision 1.5  2000/06/27 17:04:43  brianp
 | 
			
		||||
 * fixed compiler warnings
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.4  2000/03/22 19:48:57  brianp
 | 
			
		||||
 * converted from GL_EXT_texture3D to GL 1.2
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.3  1999/12/16 08:54:22  brianp
 | 
			
		||||
 * added a cast to malloc call
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.2  1999/09/17 12:27:01  brianp
 | 
			
		||||
 * silenced some warnings
 | 
			
		||||
 *
 | 
			
		||||
@@ -53,7 +62,6 @@ void init(void),
 | 
			
		||||
     initNoise(void);
 | 
			
		||||
float turbulence(float point[3], float lofreq, float hifreq);
 | 
			
		||||
 | 
			
		||||
int isExtSupported(char *ext);
 | 
			
		||||
void KeyHandler( unsigned char key, int x, int y );
 | 
			
		||||
GLenum parseCmdLine(int argc, char **argv);
 | 
			
		||||
float noise3(float vec[3]);
 | 
			
		||||
@@ -121,17 +129,20 @@ void init()
 | 
			
		||||
 /* start the noise function variables */
 | 
			
		||||
 initNoise();
 | 
			
		||||
 
 | 
			
		||||
 /* see if the texture 3d extention is supported */
 | 
			
		||||
 if (!isExtSupported("GL_EXT_texture3D")) {
 | 
			
		||||
   printf("Sorry this GL implementation (%s) does not support 3d texture extentions\n",
 | 
			
		||||
        (char *)(glGetString(GL_RENDERER)));
 | 
			
		||||
/*   tkQuit();*/
 | 
			
		||||
 /* see if we have OpenGL 1.2 or later, for 3D texturing */
 | 
			
		||||
 {
 | 
			
		||||
    const char *version = (const char *) glGetString(GL_VERSION);
 | 
			
		||||
    if (strncmp(version, "1.0", 3) == 0 ||
 | 
			
		||||
        strncmp(version, "1.1", 3) == 0) {
 | 
			
		||||
       printf("Sorry, OpenGL 1.2 or later is required\n");
 | 
			
		||||
       exit(1);
 | 
			
		||||
    }
 | 
			
		||||
 }
 | 
			
		||||
 
 | 
			
		||||
 /* if texture is supported then generate the texture */
 | 
			
		||||
 create3Dtexture(); 
 | 
			
		||||
 | 
			
		||||
 glEnable(GL_TEXTURE_3D_EXT); 
 | 
			
		||||
 glEnable(GL_TEXTURE_3D); 
 | 
			
		||||
 /*
 | 
			
		||||
 glBlendFunc(GL_SRC_COLOR, GL_SRC_ALPHA);
 | 
			
		||||
 glEnable(GL_BLEND); 
 | 
			
		||||
@@ -230,7 +241,7 @@ void create3Dtexture()
 | 
			
		||||
 int tmp;
 | 
			
		||||
 | 
			
		||||
 printf("creating 3d textures...\n");
 | 
			
		||||
 voxels = (unsigned char  *) malloc((4*tex_width*tex_height*tex_depth));
 | 
			
		||||
 voxels = (unsigned char  *) malloc((size_t)(4*tex_width*tex_height*tex_depth));
 | 
			
		||||
 vp=voxels;
 | 
			
		||||
 for (i=0;i<tex_width;i++){
 | 
			
		||||
    vec[0]=i;
 | 
			
		||||
@@ -249,39 +260,20 @@ void create3Dtexture()
 | 
			
		||||
 | 
			
		||||
 printf("setting up 3d texture...\n");
 | 
			
		||||
 glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
 | 
			
		||||
 glTexParameteri(GL_TEXTURE_3D_EXT, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
 | 
			
		||||
 glTexParameteri(GL_TEXTURE_3D_EXT, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 | 
			
		||||
 glTexParameteri(GL_TEXTURE_3D_EXT, GL_TEXTURE_WRAP_S,     GL_REPEAT);
 | 
			
		||||
 glTexParameteri(GL_TEXTURE_3D_EXT, GL_TEXTURE_WRAP_T,     GL_REPEAT);
 | 
			
		||||
 glTexParameteri(GL_TEXTURE_3D_EXT, GL_TEXTURE_WRAP_R_EXT, GL_REPEAT);
 | 
			
		||||
 glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
 | 
			
		||||
 glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 | 
			
		||||
 glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S,     GL_REPEAT);
 | 
			
		||||
 glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_T,     GL_REPEAT);
 | 
			
		||||
 glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R,     GL_REPEAT);
 | 
			
		||||
 glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
 | 
			
		||||
 | 
			
		||||
 glTexImage3DEXT(GL_TEXTURE_3D_EXT, 0, GL_RGBA,
 | 
			
		||||
                    tex_width, tex_height, tex_depth,
 | 
			
		||||
                    0, GL_RGBA, GL_UNSIGNED_BYTE, voxels);
 | 
			
		||||
 glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA,
 | 
			
		||||
              tex_width, tex_height, tex_depth,
 | 
			
		||||
              0, GL_RGBA, GL_UNSIGNED_BYTE, voxels);
 | 
			
		||||
 
 | 
			
		||||
 printf("finished setting up 3d texture image...\n");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int isExtSupported(char *ext)
 | 
			
		||||
{
 | 
			
		||||
    /* routine to find whether a specified OpenGL extension is supported */
 | 
			
		||||
 | 
			
		||||
    char *c;
 | 
			
		||||
    int len;
 | 
			
		||||
    char *allext = (char *)(glGetString(GL_EXTENSIONS));
 | 
			
		||||
 | 
			
		||||
    len = strlen(ext);
 | 
			
		||||
    if (len <= 0) return 0;
 | 
			
		||||
 | 
			
		||||
    c = allext;
 | 
			
		||||
    while (c) {
 | 
			
		||||
        if (!strncmp(c,ext,len)) return 1;
 | 
			
		||||
        c = strchr(c+1,'G');
 | 
			
		||||
    }
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void printHelp()
 | 
			
		||||
{
 | 
			
		||||
  printf("\nUsage: stex3d  <cmd line options>\n"); 
 | 
			
		||||
@@ -396,7 +388,7 @@ void resize(int w, int h)
 | 
			
		||||
 glTranslatef(0,0,-5);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void cleanEverything(void)
 | 
			
		||||
static void cleanEverything(void)
 | 
			
		||||
{
 | 
			
		||||
/*  free(voxels); */
 | 
			
		||||
}
 | 
			
		||||
@@ -432,10 +424,10 @@ void KeyHandler( unsigned char key, int x, int y )
 | 
			
		||||
         angz-=10; 
 | 
			
		||||
         break;
 | 
			
		||||
      case 't':
 | 
			
		||||
         glEnable(GL_TEXTURE_3D_EXT); 
 | 
			
		||||
         glEnable(GL_TEXTURE_3D); 
 | 
			
		||||
         break;
 | 
			
		||||
      case 'T':
 | 
			
		||||
         glDisable(GL_TEXTURE_3D_EXT);
 | 
			
		||||
         glDisable(GL_TEXTURE_3D);
 | 
			
		||||
         break;
 | 
			
		||||
      case 's':
 | 
			
		||||
         glShadeModel(GL_SMOOTH);
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										674
									
								
								progs/demos/teapot.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										674
									
								
								progs/demos/teapot.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,674 @@
 | 
			
		||||
/*
 | 
			
		||||
 * This program is under the GNU GPL.
 | 
			
		||||
 * Use at your own risk.
 | 
			
		||||
 *
 | 
			
		||||
 * written by David Bucciarelli (tech.hmw@plus.it)
 | 
			
		||||
 *            Humanware s.r.l.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <time.h>
 | 
			
		||||
 | 
			
		||||
#ifdef WIN32
 | 
			
		||||
#include <windows.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
#include "readtex.c"
 | 
			
		||||
 | 
			
		||||
#ifdef XMESA
 | 
			
		||||
#include "GL/xmesa.h"
 | 
			
		||||
static int fullscreen=1;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
static int WIDTH=640;
 | 
			
		||||
static int HEIGHT=480;
 | 
			
		||||
 | 
			
		||||
static GLint T0 = 0;
 | 
			
		||||
static GLint Frames = 0;
 | 
			
		||||
 | 
			
		||||
#define BASESIZE 10.0
 | 
			
		||||
 | 
			
		||||
#define BASERES 12
 | 
			
		||||
#define TEAPOTRES 3
 | 
			
		||||
 | 
			
		||||
#ifndef M_PI
 | 
			
		||||
#define M_PI 3.1415926535
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
extern void shadowmatrix(GLfloat [4][4], GLfloat [4], GLfloat [4]);
 | 
			
		||||
extern void findplane(GLfloat [4], GLfloat [3], GLfloat [3], GLfloat [3]);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static int win=0;
 | 
			
		||||
 | 
			
		||||
static float obs[3]={5.0,0.0,1.0};
 | 
			
		||||
static float dir[3];
 | 
			
		||||
static float v=0.0;
 | 
			
		||||
static float alpha=-90.0;
 | 
			
		||||
static float beta=90.0;
 | 
			
		||||
 | 
			
		||||
static GLfloat baseshadow[4][4];
 | 
			
		||||
static GLfloat lightpos[4]={2.3,0.0,3.0,1.0};
 | 
			
		||||
static GLfloat lightdir[3]={-2.3,0.0,-3.0};
 | 
			
		||||
static GLfloat lightalpha=0.0;
 | 
			
		||||
 | 
			
		||||
static int fog=1;
 | 
			
		||||
static int bfcull=1;
 | 
			
		||||
static int usetex=1;
 | 
			
		||||
static int help=1;
 | 
			
		||||
static int joyavailable=0;
 | 
			
		||||
static int joyactive=0;
 | 
			
		||||
 | 
			
		||||
static GLuint t1id,t2id;
 | 
			
		||||
static GLuint teapotdlist,basedlist,lightdlist;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/******************** begin shadow code ********************/
 | 
			
		||||
 | 
			
		||||
/* Taken from the projshadow.c - by Tom McReynolds, SGI */
 | 
			
		||||
 | 
			
		||||
/* Modified by David Bucciarelli */
 | 
			
		||||
 | 
			
		||||
enum {
 | 
			
		||||
  X, Y, Z, W
 | 
			
		||||
};
 | 
			
		||||
enum {
 | 
			
		||||
  A, B, C, D
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/* create a matrix that will project the desired shadow */
 | 
			
		||||
void
 | 
			
		||||
shadowmatrix(GLfloat shadowMat[4][4],
 | 
			
		||||
  GLfloat groundplane[4],
 | 
			
		||||
  GLfloat lightpos[4])
 | 
			
		||||
{
 | 
			
		||||
  GLfloat dot;
 | 
			
		||||
 | 
			
		||||
  /* find dot product between light position vector and ground plane normal */
 | 
			
		||||
  dot = groundplane[X] * lightpos[X] +
 | 
			
		||||
    groundplane[Y] * lightpos[Y] +
 | 
			
		||||
    groundplane[Z] * lightpos[Z] +
 | 
			
		||||
    groundplane[W] * lightpos[W];
 | 
			
		||||
 | 
			
		||||
  shadowMat[0][0] = dot - lightpos[X] * groundplane[X];
 | 
			
		||||
  shadowMat[1][0] = 0.f - lightpos[X] * groundplane[Y];
 | 
			
		||||
  shadowMat[2][0] = 0.f - lightpos[X] * groundplane[Z];
 | 
			
		||||
  shadowMat[3][0] = 0.f - lightpos[X] * groundplane[W];
 | 
			
		||||
 | 
			
		||||
  shadowMat[X][1] = 0.f - lightpos[Y] * groundplane[X];
 | 
			
		||||
  shadowMat[1][1] = dot - lightpos[Y] * groundplane[Y];
 | 
			
		||||
  shadowMat[2][1] = 0.f - lightpos[Y] * groundplane[Z];
 | 
			
		||||
  shadowMat[3][1] = 0.f - lightpos[Y] * groundplane[W];
 | 
			
		||||
 | 
			
		||||
  shadowMat[X][2] = 0.f - lightpos[Z] * groundplane[X];
 | 
			
		||||
  shadowMat[1][2] = 0.f - lightpos[Z] * groundplane[Y];
 | 
			
		||||
  shadowMat[2][2] = dot - lightpos[Z] * groundplane[Z];
 | 
			
		||||
  shadowMat[3][2] = 0.f - lightpos[Z] * groundplane[W];
 | 
			
		||||
 | 
			
		||||
  shadowMat[X][3] = 0.f - lightpos[W] * groundplane[X];
 | 
			
		||||
  shadowMat[1][3] = 0.f - lightpos[W] * groundplane[Y];
 | 
			
		||||
  shadowMat[2][3] = 0.f - lightpos[W] * groundplane[Z];
 | 
			
		||||
  shadowMat[3][3] = dot - lightpos[W] * groundplane[W];
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* find the plane equation given 3 points */
 | 
			
		||||
void
 | 
			
		||||
findplane(GLfloat plane[4],
 | 
			
		||||
  GLfloat v0[3], GLfloat v1[3], GLfloat v2[3])
 | 
			
		||||
{
 | 
			
		||||
  GLfloat vec0[3], vec1[3];
 | 
			
		||||
 | 
			
		||||
  /* need 2 vectors to find cross product */
 | 
			
		||||
  vec0[X] = v1[X] - v0[X];
 | 
			
		||||
  vec0[Y] = v1[Y] - v0[Y];
 | 
			
		||||
  vec0[Z] = v1[Z] - v0[Z];
 | 
			
		||||
 | 
			
		||||
  vec1[X] = v2[X] - v0[X];
 | 
			
		||||
  vec1[Y] = v2[Y] - v0[Y];
 | 
			
		||||
  vec1[Z] = v2[Z] - v0[Z];
 | 
			
		||||
 | 
			
		||||
  /* find cross product to get A, B, and C of plane equation */
 | 
			
		||||
  plane[A] = vec0[Y] * vec1[Z] - vec0[Z] * vec1[Y];
 | 
			
		||||
  plane[B] = -(vec0[X] * vec1[Z] - vec0[Z] * vec1[X]);
 | 
			
		||||
  plane[C] = vec0[X] * vec1[Y] - vec0[Y] * vec1[X];
 | 
			
		||||
 | 
			
		||||
  plane[D] = -(plane[A] * v0[X] + plane[B] * v0[Y] + plane[C] * v0[Z]);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/******************** end shadow code ********************/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void calcposobs(void)
 | 
			
		||||
{
 | 
			
		||||
  dir[0]=sin(alpha*M_PI/180.0);
 | 
			
		||||
  dir[1]=cos(alpha*M_PI/180.0)*sin(beta*M_PI/180.0);
 | 
			
		||||
  dir[2]=cos(beta*M_PI/180.0);
 | 
			
		||||
 | 
			
		||||
  obs[0]+=v*dir[0];
 | 
			
		||||
  obs[1]+=v*dir[1];
 | 
			
		||||
  obs[2]+=v*dir[2];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void special(int k, int x, int y)
 | 
			
		||||
{
 | 
			
		||||
  switch(k) {
 | 
			
		||||
  case GLUT_KEY_LEFT:
 | 
			
		||||
    alpha-=2.0;
 | 
			
		||||
    break;
 | 
			
		||||
  case GLUT_KEY_RIGHT:
 | 
			
		||||
    alpha+=2.0;
 | 
			
		||||
    break;
 | 
			
		||||
  case GLUT_KEY_DOWN:
 | 
			
		||||
    beta-=2.0;
 | 
			
		||||
    break;
 | 
			
		||||
  case GLUT_KEY_UP:
 | 
			
		||||
    beta+=2.0;
 | 
			
		||||
    break;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void key(unsigned char k, int x, int y)
 | 
			
		||||
{
 | 
			
		||||
  switch(k) {
 | 
			
		||||
  case 27:
 | 
			
		||||
    exit(0);
 | 
			
		||||
    break;
 | 
			
		||||
    
 | 
			
		||||
  case 'a':
 | 
			
		||||
    v+=0.005;
 | 
			
		||||
    break;
 | 
			
		||||
  case 'z':
 | 
			
		||||
    v-=0.005;
 | 
			
		||||
    break;
 | 
			
		||||
 | 
			
		||||
  case 'j':
 | 
			
		||||
    joyactive=(!joyactive);
 | 
			
		||||
    break;
 | 
			
		||||
  case 'h':
 | 
			
		||||
    help=(!help);
 | 
			
		||||
    break;
 | 
			
		||||
  case 'f':
 | 
			
		||||
    fog=(!fog);
 | 
			
		||||
    break;
 | 
			
		||||
  case 't':
 | 
			
		||||
    usetex=(!usetex);
 | 
			
		||||
    break;
 | 
			
		||||
  case 'b':
 | 
			
		||||
    if(bfcull) {
 | 
			
		||||
      glDisable(GL_CULL_FACE);
 | 
			
		||||
      bfcull=0;
 | 
			
		||||
    } else {
 | 
			
		||||
      glEnable(GL_CULL_FACE);
 | 
			
		||||
      bfcull=1;
 | 
			
		||||
    }
 | 
			
		||||
    break;
 | 
			
		||||
#ifdef XMESA
 | 
			
		||||
  case ' ':
 | 
			
		||||
    XMesaSetFXmode(fullscreen ? XMESA_FX_FULLSCREEN : XMESA_FX_WINDOW);
 | 
			
		||||
    fullscreen=(!fullscreen);
 | 
			
		||||
    break;
 | 
			
		||||
#endif
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void reshape(int w, int h) 
 | 
			
		||||
{
 | 
			
		||||
  WIDTH=w;
 | 
			
		||||
  HEIGHT=h;
 | 
			
		||||
  glMatrixMode(GL_PROJECTION);
 | 
			
		||||
  glLoadIdentity();
 | 
			
		||||
  gluPerspective(45.0,w/(float)h,0.2,40.0);
 | 
			
		||||
  glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
  glLoadIdentity();
 | 
			
		||||
  glViewport(0,0,w,h);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void printstring(void *font, char *string)
 | 
			
		||||
{
 | 
			
		||||
  int len,i;
 | 
			
		||||
 | 
			
		||||
  len=(int)strlen(string);
 | 
			
		||||
  for(i=0;i<len;i++)
 | 
			
		||||
    glutBitmapCharacter(font,string[i]);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void printhelp(void)
 | 
			
		||||
{
 | 
			
		||||
  glEnable(GL_BLEND);
 | 
			
		||||
  glColor4f(0.5,0.5,0.5,0.5);
 | 
			
		||||
  glRecti(40,40,600,440);
 | 
			
		||||
  glDisable(GL_BLEND);
 | 
			
		||||
 | 
			
		||||
  glColor3f(1.0,0.0,0.0);
 | 
			
		||||
  glRasterPos2i(300,420);
 | 
			
		||||
  printstring(GLUT_BITMAP_TIMES_ROMAN_24,"Help");
 | 
			
		||||
 | 
			
		||||
  glRasterPos2i(60,390);
 | 
			
		||||
  printstring(GLUT_BITMAP_TIMES_ROMAN_24,"h - Togle Help");
 | 
			
		||||
  glRasterPos2i(60,360);
 | 
			
		||||
  printstring(GLUT_BITMAP_TIMES_ROMAN_24,"t - Togle Textures");
 | 
			
		||||
  glRasterPos2i(60,330);
 | 
			
		||||
  printstring(GLUT_BITMAP_TIMES_ROMAN_24,"f - Togle Fog");
 | 
			
		||||
  glRasterPos2i(60,300);
 | 
			
		||||
  printstring(GLUT_BITMAP_TIMES_ROMAN_24,"b - Togle Back face culling");
 | 
			
		||||
  glRasterPos2i(60,270);
 | 
			
		||||
  printstring(GLUT_BITMAP_TIMES_ROMAN_24,"Arrow Keys - Rotate");
 | 
			
		||||
  glRasterPos2i(60,240);
 | 
			
		||||
  printstring(GLUT_BITMAP_TIMES_ROMAN_24,"a - Increase velocity");
 | 
			
		||||
  glRasterPos2i(60,210);
 | 
			
		||||
  printstring(GLUT_BITMAP_TIMES_ROMAN_24,"z - Decrease velocity");
 | 
			
		||||
 | 
			
		||||
  glRasterPos2i(60,180);
 | 
			
		||||
  if(joyavailable)
 | 
			
		||||
    printstring(GLUT_BITMAP_TIMES_ROMAN_24,"j - Togle jostick control (Joystick control available)");
 | 
			
		||||
  else
 | 
			
		||||
    printstring(GLUT_BITMAP_TIMES_ROMAN_24,"(No Joystick control available)");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void drawbase(void)
 | 
			
		||||
{
 | 
			
		||||
  static const GLfloat amb[4] = { 1, .5, 0.2, 1 };
 | 
			
		||||
  static const GLfloat diff[4] = { 1, .4, 0.2, 1 };
 | 
			
		||||
  int i,j;
 | 
			
		||||
  float x,y,dx,dy;
 | 
			
		||||
 | 
			
		||||
  glBindTexture(GL_TEXTURE_2D,t1id);
 | 
			
		||||
 | 
			
		||||
  glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, amb);
 | 
			
		||||
  glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, diff);
 | 
			
		||||
  dx=BASESIZE/BASERES;
 | 
			
		||||
  dy=-BASESIZE/BASERES;
 | 
			
		||||
  for(y=BASESIZE/2.0,j=0;j<BASERES;y+=dy,j++) {
 | 
			
		||||
    glBegin(GL_QUAD_STRIP);
 | 
			
		||||
    glColor3f(1.0,1.0,1.0);
 | 
			
		||||
    glNormal3f(0.0,0.0,1.0);
 | 
			
		||||
    for(x=-BASESIZE/2.0,i=0;i<BASERES;x+=dx,i++) {
 | 
			
		||||
      glTexCoord2f(x,y);
 | 
			
		||||
      glVertex3f(x,y,0.0);
 | 
			
		||||
 | 
			
		||||
      glTexCoord2f(x,y+dy);
 | 
			
		||||
      glVertex3f(x,y+dy,0.0);
 | 
			
		||||
    }
 | 
			
		||||
    glEnd();
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void drawteapot(void)
 | 
			
		||||
{
 | 
			
		||||
  static const GLfloat amb[4] = {  0.2, 0.2, 0.2, 1 };
 | 
			
		||||
  static const GLfloat diff[4] = { 0.8, 0.3, 0.5, 1 };
 | 
			
		||||
  static float xrot=0.0;
 | 
			
		||||
  static float zrot=0.0;
 | 
			
		||||
 | 
			
		||||
  glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, amb);
 | 
			
		||||
  glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, diff);
 | 
			
		||||
 | 
			
		||||
  glPushMatrix();
 | 
			
		||||
  glRotatef(lightalpha,0.0,0.0,1.0);
 | 
			
		||||
  glMultMatrixf((GLfloat *)baseshadow);
 | 
			
		||||
  glRotatef(-lightalpha,0.0,0.0,1.0);
 | 
			
		||||
 | 
			
		||||
  glTranslatef(0.0,0.0,1.0);
 | 
			
		||||
  glRotatef(xrot,1.0,0.0,0.0);
 | 
			
		||||
  glRotatef(zrot,0.0,0.0,1.0);
 | 
			
		||||
 | 
			
		||||
  glDisable(GL_TEXTURE_2D);
 | 
			
		||||
  glDisable(GL_DEPTH_TEST);
 | 
			
		||||
  glDisable(GL_LIGHTING);
 | 
			
		||||
 | 
			
		||||
  glColor3f(0.0,0.0,0.0);
 | 
			
		||||
  glCallList(teapotdlist);
 | 
			
		||||
 | 
			
		||||
  glEnable(GL_DEPTH_TEST);
 | 
			
		||||
  glEnable(GL_LIGHTING);
 | 
			
		||||
  if(usetex)
 | 
			
		||||
    glEnable(GL_TEXTURE_2D);
 | 
			
		||||
 | 
			
		||||
  glPopMatrix();
 | 
			
		||||
 | 
			
		||||
  glPushMatrix();
 | 
			
		||||
  glTranslatef(0.0,0.0,1.0);
 | 
			
		||||
  glRotatef(xrot,1.0,0.0,0.0);
 | 
			
		||||
  glRotatef(zrot,0.0,0.0,1.0);
 | 
			
		||||
 | 
			
		||||
  glCallList(teapotdlist);
 | 
			
		||||
  glPopMatrix();
 | 
			
		||||
 | 
			
		||||
  xrot+=2.0;
 | 
			
		||||
  zrot+=1.0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void drawlight1(void)
 | 
			
		||||
{
 | 
			
		||||
  glPushMatrix();
 | 
			
		||||
  glRotatef(lightalpha,0.0,0.0,1.0);
 | 
			
		||||
  glLightfv(GL_LIGHT0,GL_POSITION,lightpos);
 | 
			
		||||
  glLightfv(GL_LIGHT0,GL_SPOT_DIRECTION,lightdir);
 | 
			
		||||
 | 
			
		||||
  glPopMatrix();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void drawlight2(void)
 | 
			
		||||
{
 | 
			
		||||
  glPushMatrix();
 | 
			
		||||
  glRotatef(lightalpha,0.0,0.0,1.0);
 | 
			
		||||
  glTranslatef(lightpos[0],lightpos[1],lightpos[2]);
 | 
			
		||||
 | 
			
		||||
  glDisable(GL_TEXTURE_2D);
 | 
			
		||||
  glCallList(lightdlist);
 | 
			
		||||
  if(usetex)
 | 
			
		||||
    glEnable(GL_TEXTURE_2D);
 | 
			
		||||
  
 | 
			
		||||
  glPopMatrix();
 | 
			
		||||
 | 
			
		||||
  lightalpha+=1.0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void dojoy(void)
 | 
			
		||||
{
 | 
			
		||||
#ifdef WIN32
 | 
			
		||||
  static UINT max[2]={0,0};
 | 
			
		||||
  static UINT min[2]={0xffffffff,0xffffffff},center[2];
 | 
			
		||||
  MMRESULT res;
 | 
			
		||||
  JOYINFO joy;
 | 
			
		||||
 | 
			
		||||
  res=joyGetPos(JOYSTICKID1,&joy);
 | 
			
		||||
 | 
			
		||||
  if(res==JOYERR_NOERROR) {
 | 
			
		||||
    joyavailable=1;
 | 
			
		||||
 | 
			
		||||
    if(max[0]<joy.wXpos)
 | 
			
		||||
      max[0]=joy.wXpos;
 | 
			
		||||
    if(min[0]>joy.wXpos)
 | 
			
		||||
      min[0]=joy.wXpos;
 | 
			
		||||
    center[0]=(max[0]+min[0])/2;
 | 
			
		||||
 | 
			
		||||
    if(max[1]<joy.wYpos)
 | 
			
		||||
      max[1]=joy.wYpos;
 | 
			
		||||
    if(min[1]>joy.wYpos)
 | 
			
		||||
      min[1]=joy.wYpos;
 | 
			
		||||
    center[1]=(max[1]+min[1])/2;
 | 
			
		||||
 | 
			
		||||
    if(joyactive) {
 | 
			
		||||
      if(fabs(center[0]-(float)joy.wXpos)>0.1*(max[0]-min[0]))
 | 
			
		||||
	alpha-=2.5*(center[0]-(float)joy.wXpos)/(max[0]-min[0]);
 | 
			
		||||
      if(fabs(center[1]-(float)joy.wYpos)>0.1*(max[1]-min[1]))
 | 
			
		||||
	beta+=2.5*(center[1]-(float)joy.wYpos)/(max[1]-min[1]);
 | 
			
		||||
 | 
			
		||||
      if(joy.wButtons & JOY_BUTTON1)
 | 
			
		||||
	v+=0.005;
 | 
			
		||||
      if(joy.wButtons & JOY_BUTTON2)
 | 
			
		||||
	v-=0.005;
 | 
			
		||||
    }
 | 
			
		||||
  } else
 | 
			
		||||
    joyavailable=0;
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void draw(void)
 | 
			
		||||
{
 | 
			
		||||
  static char frbuf[80] = "";
 | 
			
		||||
 | 
			
		||||
  dojoy();
 | 
			
		||||
 | 
			
		||||
  glEnable(GL_DEPTH_TEST);
 | 
			
		||||
  glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
 | 
			
		||||
 | 
			
		||||
  if(usetex)
 | 
			
		||||
    glEnable(GL_TEXTURE_2D);
 | 
			
		||||
  else
 | 
			
		||||
    glDisable(GL_TEXTURE_2D);
 | 
			
		||||
 | 
			
		||||
  if(fog)
 | 
			
		||||
    glEnable(GL_FOG);
 | 
			
		||||
  else
 | 
			
		||||
    glDisable(GL_FOG);
 | 
			
		||||
 | 
			
		||||
  glEnable(GL_LIGHTING);
 | 
			
		||||
 | 
			
		||||
  glShadeModel(GL_SMOOTH);
 | 
			
		||||
 | 
			
		||||
  glPushMatrix();
 | 
			
		||||
  calcposobs();
 | 
			
		||||
 | 
			
		||||
  gluLookAt(obs[0],obs[1],obs[2],
 | 
			
		||||
	    obs[0]+dir[0],obs[1]+dir[1],obs[2]+dir[2],
 | 
			
		||||
	    0.0,0.0,1.0);
 | 
			
		||||
 | 
			
		||||
  drawlight1();
 | 
			
		||||
  glCallList(basedlist);
 | 
			
		||||
  drawteapot();
 | 
			
		||||
  drawlight2();
 | 
			
		||||
  glPopMatrix();
 | 
			
		||||
  
 | 
			
		||||
  glDisable(GL_LIGHTING);
 | 
			
		||||
  glDisable(GL_TEXTURE_2D);
 | 
			
		||||
  glDisable(GL_DEPTH_TEST);
 | 
			
		||||
  glDisable(GL_FOG);
 | 
			
		||||
  glShadeModel(GL_FLAT);
 | 
			
		||||
 | 
			
		||||
  glMatrixMode(GL_PROJECTION);
 | 
			
		||||
  glLoadIdentity();
 | 
			
		||||
  glOrtho(-0.5,639.5,-0.5,479.5,-1.0,1.0);
 | 
			
		||||
  glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
  glLoadIdentity();
 | 
			
		||||
 | 
			
		||||
  glColor3f(1.0,0.0,0.0);
 | 
			
		||||
  glRasterPos2i(10,10);
 | 
			
		||||
  printstring(GLUT_BITMAP_HELVETICA_18,frbuf);
 | 
			
		||||
  glRasterPos2i(350,470);
 | 
			
		||||
  printstring(GLUT_BITMAP_HELVETICA_10,"Teapot V1.2 Written by David Bucciarelli (tech.hmw@plus.it)");
 | 
			
		||||
 | 
			
		||||
  if(help)
 | 
			
		||||
    printhelp();
 | 
			
		||||
 | 
			
		||||
  reshape(WIDTH,HEIGHT);
 | 
			
		||||
 | 
			
		||||
  glutSwapBuffers();
 | 
			
		||||
 | 
			
		||||
   Frames++;
 | 
			
		||||
 | 
			
		||||
   {
 | 
			
		||||
      GLint t = glutGet(GLUT_ELAPSED_TIME);
 | 
			
		||||
      if (t - T0 >= 2000) {
 | 
			
		||||
         GLfloat seconds = (t - T0) / 1000.0;
 | 
			
		||||
         GLfloat fps = Frames / seconds;
 | 
			
		||||
         sprintf(frbuf, "Frame rate: %f", fps);
 | 
			
		||||
         T0 = t;
 | 
			
		||||
         Frames = 0;
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void inittextures(void)
 | 
			
		||||
{
 | 
			
		||||
  glGenTextures(1,&t1id);
 | 
			
		||||
  glBindTexture(GL_TEXTURE_2D,t1id);
 | 
			
		||||
 | 
			
		||||
  glPixelStorei(GL_UNPACK_ALIGNMENT,4);
 | 
			
		||||
  if (!LoadRGBMipmaps("../images/tile.rgb", GL_RGB)) {
 | 
			
		||||
    fprintf(stderr,"Error reading a texture.\n");
 | 
			
		||||
    exit(-1);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT);
 | 
			
		||||
  glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_REPEAT);
 | 
			
		||||
  
 | 
			
		||||
  glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_LINEAR);
 | 
			
		||||
  glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
 | 
			
		||||
 | 
			
		||||
  glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_MODULATE);
 | 
			
		||||
 | 
			
		||||
  glGenTextures(1,&t2id);
 | 
			
		||||
  glBindTexture(GL_TEXTURE_2D,t2id);
 | 
			
		||||
 | 
			
		||||
  glPixelTransferf(GL_RED_SCALE, 0.75);
 | 
			
		||||
  glPixelTransferf(GL_RED_BIAS, 0.25);
 | 
			
		||||
  glPixelTransferf(GL_GREEN_SCALE, 0.75);
 | 
			
		||||
  glPixelTransferf(GL_GREEN_BIAS, 0.25);
 | 
			
		||||
  glPixelTransferf(GL_BLUE_SCALE, 0.75);
 | 
			
		||||
  glPixelTransferf(GL_BLUE_BIAS, 0.25);
 | 
			
		||||
 | 
			
		||||
  if (!LoadRGBMipmaps("../images/bw.rgb", GL_RGB)) {
 | 
			
		||||
    fprintf(stderr,"Error reading a texture.\n");
 | 
			
		||||
    exit(-1);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  glPixelTransferf(GL_RED_SCALE, 1.0);
 | 
			
		||||
  glPixelTransferf(GL_RED_BIAS, 0.0);
 | 
			
		||||
  glPixelTransferf(GL_GREEN_SCALE, 1.0);
 | 
			
		||||
  glPixelTransferf(GL_GREEN_BIAS, 0.0);
 | 
			
		||||
  glPixelTransferf(GL_BLUE_SCALE, 1.0);
 | 
			
		||||
  glPixelTransferf(GL_BLUE_BIAS, 0.0);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT);
 | 
			
		||||
  glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_REPEAT);
 | 
			
		||||
  
 | 
			
		||||
  glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_LINEAR);
 | 
			
		||||
  glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
 | 
			
		||||
 | 
			
		||||
  glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_MODULATE);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void initlight(void)
 | 
			
		||||
{
 | 
			
		||||
  float matamb[4] ={0.5, 0.5, 0.5, 1.0};
 | 
			
		||||
  float matdiff[4]={0.9, 0.2, 0.2, 1.0};
 | 
			
		||||
  float matspec[4]={1.0,1.0,1.0,1.0};
 | 
			
		||||
 | 
			
		||||
  float lamb[4] ={1.5, 1.5, 1.5, 1.0};
 | 
			
		||||
  float ldiff[4]={1.0, 1.0, 1.0, 1.0};
 | 
			
		||||
  float lspec[4]={1.0, 1.0, 1.0, 1.0};
 | 
			
		||||
 | 
			
		||||
  glLightf(GL_LIGHT0,GL_SPOT_CUTOFF,70.0);
 | 
			
		||||
  glLightf(GL_LIGHT0,GL_SPOT_EXPONENT,20.0);
 | 
			
		||||
  glLightfv(GL_LIGHT0,GL_AMBIENT,lamb);
 | 
			
		||||
  glLightfv(GL_LIGHT0,GL_DIFFUSE,ldiff);
 | 
			
		||||
  glLightfv(GL_LIGHT0,GL_SPECULAR,lspec);
 | 
			
		||||
 | 
			
		||||
  glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 15.0);
 | 
			
		||||
  glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, matdiff);
 | 
			
		||||
  glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, matspec);
 | 
			
		||||
  glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, matamb);
 | 
			
		||||
 | 
			
		||||
  glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lamb);
 | 
			
		||||
  glEnable(GL_LIGHT0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void initdlists(void)
 | 
			
		||||
{
 | 
			
		||||
  GLUquadricObj *lcone,*lbase;
 | 
			
		||||
  GLfloat plane[4];
 | 
			
		||||
  GLfloat v0[3]={0.0,0.0,0.0};
 | 
			
		||||
  GLfloat v1[3]={1.0,0.0,0.0};
 | 
			
		||||
  GLfloat v2[3]={0.0,1.0,0.0};
 | 
			
		||||
 | 
			
		||||
  findplane(plane,v0,v1,v2);
 | 
			
		||||
  shadowmatrix(baseshadow,plane,lightpos);
 | 
			
		||||
 | 
			
		||||
  teapotdlist=glGenLists(1);
 | 
			
		||||
  glNewList(teapotdlist,GL_COMPILE);
 | 
			
		||||
  glRotatef(90.0,1.0,0.0,0.0);
 | 
			
		||||
  glCullFace(GL_FRONT);
 | 
			
		||||
  glBindTexture(GL_TEXTURE_2D,t2id);
 | 
			
		||||
  glutSolidTeapot(0.75);
 | 
			
		||||
  glCullFace(GL_BACK);
 | 
			
		||||
  glEndList();
 | 
			
		||||
 | 
			
		||||
  basedlist=glGenLists(1);
 | 
			
		||||
  glNewList(basedlist,GL_COMPILE);
 | 
			
		||||
  drawbase();
 | 
			
		||||
  glEndList();
 | 
			
		||||
 | 
			
		||||
  lightdlist=glGenLists(1);
 | 
			
		||||
  glNewList(lightdlist,GL_COMPILE);
 | 
			
		||||
  glDisable(GL_LIGHTING);
 | 
			
		||||
 
 | 
			
		||||
  lcone=gluNewQuadric();
 | 
			
		||||
  lbase=gluNewQuadric();
 | 
			
		||||
  glRotatef(45.0,0.0,1.0,0.0);
 | 
			
		||||
 | 
			
		||||
  glColor3f(1.0,1.0,1.0);
 | 
			
		||||
  glCullFace(GL_FRONT);
 | 
			
		||||
  gluDisk(lbase,0.0,0.2,12.0,1.0);
 | 
			
		||||
  glCullFace(GL_BACK);
 | 
			
		||||
 | 
			
		||||
  glColor3f(0.5,0.0,0.0);
 | 
			
		||||
  gluCylinder(lcone,0.2,0.0,0.5,12,1);
 | 
			
		||||
 | 
			
		||||
  gluDeleteQuadric(lcone);
 | 
			
		||||
  gluDeleteQuadric(lbase);
 | 
			
		||||
 | 
			
		||||
  glEnable(GL_LIGHTING);
 | 
			
		||||
  glEndList();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int main(int ac, char **av)
 | 
			
		||||
{
 | 
			
		||||
  float fogcolor[4]={0.025,0.025,0.025,1.0};
 | 
			
		||||
 | 
			
		||||
  fprintf(stderr,"Teapot V1.2\nWritten by David Bucciarelli (tech.hmw@plus.it)\n");
 | 
			
		||||
 | 
			
		||||
  /*
 | 
			
		||||
    if(!SetPriorityClass(GetCurrentProcess(),REALTIME_PRIORITY_CLASS)) {
 | 
			
		||||
    fprintf(stderr,"Error setting the process class.\n");
 | 
			
		||||
    return 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if(!SetThreadPriority(GetCurrentThread(),THREAD_PRIORITY_TIME_CRITICAL)) {
 | 
			
		||||
    fprintf(stderr,"Error setting the process priority.\n");
 | 
			
		||||
    return 0;
 | 
			
		||||
    }
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
  glutInitWindowPosition(0,0);
 | 
			
		||||
  glutInitWindowSize(WIDTH,HEIGHT);
 | 
			
		||||
  glutInit(&ac,av);
 | 
			
		||||
 | 
			
		||||
  glutInitDisplayMode(GLUT_RGB|GLUT_DEPTH|GLUT_DOUBLE);
 | 
			
		||||
 | 
			
		||||
  if(!(win=glutCreateWindow("Teapot"))) {
 | 
			
		||||
    fprintf(stderr,"Error, couldn't open window\n");
 | 
			
		||||
	return -1;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  reshape(WIDTH,HEIGHT);
 | 
			
		||||
 | 
			
		||||
  glShadeModel(GL_SMOOTH);
 | 
			
		||||
  glEnable(GL_DEPTH_TEST);
 | 
			
		||||
  glEnable(GL_CULL_FACE);
 | 
			
		||||
  glEnable(GL_TEXTURE_2D);
 | 
			
		||||
 | 
			
		||||
  glEnable(GL_FOG);
 | 
			
		||||
  glFogi(GL_FOG_MODE,GL_EXP2);
 | 
			
		||||
  glFogfv(GL_FOG_COLOR,fogcolor);
 | 
			
		||||
 | 
			
		||||
  glFogf(GL_FOG_DENSITY,0.04);
 | 
			
		||||
  glHint(GL_FOG_HINT,GL_NICEST);
 | 
			
		||||
  glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
 | 
			
		||||
 | 
			
		||||
  calcposobs();
 | 
			
		||||
 | 
			
		||||
  inittextures();
 | 
			
		||||
  initlight();
 | 
			
		||||
 | 
			
		||||
  initdlists();
 | 
			
		||||
 | 
			
		||||
  glClearColor(fogcolor[0],fogcolor[1],fogcolor[2],fogcolor[3]);
 | 
			
		||||
 | 
			
		||||
  glutReshapeFunc(reshape);
 | 
			
		||||
  glutDisplayFunc(draw);
 | 
			
		||||
  glutKeyboardFunc(key);
 | 
			
		||||
  glutSpecialFunc(special);
 | 
			
		||||
  glutIdleFunc(draw);
 | 
			
		||||
 | 
			
		||||
  glutMainLoop();
 | 
			
		||||
 | 
			
		||||
  return 0;
 | 
			
		||||
}
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user