/usr/share/gtk-doc/html/cogl/cogl-General-API.html is in libcogl-doc 1.16.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>General API</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="Cogl Reference Manual">
<link rel="up" href="ch01.html" title="Cogl - a modern 3D graphics API">
<link rel="prev" href="ch01.html" title="Cogl - a modern 3D graphics API">
<link rel="next" href="cogl-Color-Type.html" title="Color Type">
<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="ch01.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Cogl Reference Manual</th>
<td><a accesskey="n" href="cogl-Color-Type.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#cogl-General-API.synopsis" class="shortcut">Top</a>
|
<a href="#cogl-General-API.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="cogl-General-API"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="cogl-General-API.top_of_page"></a>General API</span></h2>
<p>General API — General purpose API</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="cogl-General-API.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis"> <a class="link" href="cogl-General-API.html#CoglObject" title="CoglObject">CoglObject</a>;
<span class="returnvalue">void</span> * <a class="link" href="cogl-General-API.html#cogl-object-ref" title="cogl_object_ref ()">cogl_object_ref</a> (<em class="parameter"><code><span class="type">void</span> *object</code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-object-unref" title="cogl_object_unref ()">cogl_object_unref</a> (<em class="parameter"><code><span class="type">void</span> *object</code></em>);
<a class="link" href="cogl-General-API.html#CoglUserDataKey" title="CoglUserDataKey">CoglUserDataKey</a>;
<span class="returnvalue">void</span> * <a class="link" href="cogl-General-API.html#cogl-object-get-user-data" title="cogl_object_get_user_data ()">cogl_object_get_user_data</a> (<em class="parameter"><code><a class="link" href="cogl-General-API.html#CoglObject" title="CoglObject"><span class="type">CoglObject</span></a> *object</code></em>,
<em class="parameter"><code><a class="link" href="cogl-General-API.html#CoglUserDataKey" title="CoglUserDataKey"><span class="type">CoglUserDataKey</span></a> *key</code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-object-set-user-data" title="cogl_object_set_user_data ()">cogl_object_set_user_data</a> (<em class="parameter"><code><a class="link" href="cogl-General-API.html#CoglObject" title="CoglObject"><span class="type">CoglObject</span></a> *object</code></em>,
<em class="parameter"><code><a class="link" href="cogl-General-API.html#CoglUserDataKey" title="CoglUserDataKey"><span class="type">CoglUserDataKey</span></a> *key</code></em>,
<em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
<em class="parameter"><code><span class="type">CoglUserDataDestroyCallback</span> destroy</code></em>);
#define <a class="link" href="cogl-General-API.html#COGL-INVALID-HANDLE:CAPS" title="COGL_INVALID_HANDLE">COGL_INVALID_HANDLE</a>
typedef <a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a>;
<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> <a class="link" href="cogl-General-API.html#cogl-handle-ref" title="cogl_handle_ref ()">cogl_handle_ref</a> (<em class="parameter"><code><a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="type">CoglHandle</span></a> handle</code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-handle-unref" title="cogl_handle_unref ()">cogl_handle_unref</a> (<em class="parameter"><code><a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="type">CoglHandle</span></a> handle</code></em>);
<span class="returnvalue">void</span> (<a class="link" href="cogl-General-API.html#CoglFuncPtr" title="CoglFuncPtr ()">*CoglFuncPtr</a>) (<em class="parameter"><code><span class="type">void</span></code></em>);
enum <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat">CoglPixelFormat</a>;
enum <a class="link" href="cogl-General-API.html#CoglBufferTarget" title="enum CoglBufferTarget">CoglBufferTarget</a>;
enum <a class="link" href="cogl-General-API.html#CoglBufferBit" title="enum CoglBufferBit">CoglBufferBit</a>;
enum <a class="link" href="cogl-General-API.html#CoglAttributeType" title="enum CoglAttributeType">CoglAttributeType</a>;
enum <a class="link" href="cogl-General-API.html#CoglFeatureFlags" title="enum CoglFeatureFlags">CoglFeatureFlags</a>;
<a class="link" href="cogl-General-API.html#CoglFeatureFlags" title="enum CoglFeatureFlags"><span class="returnvalue">CoglFeatureFlags</span></a> <a class="link" href="cogl-General-API.html#cogl-get-features" title="cogl_get_features ()">cogl_get_features</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">CoglBool</span> <a class="link" href="cogl-General-API.html#cogl-features-available" title="cogl_features_available ()">cogl_features_available</a> (<em class="parameter"><code><a class="link" href="cogl-General-API.html#CoglFeatureFlags" title="enum CoglFeatureFlags"><span class="type">CoglFeatureFlags</span></a> features</code></em>);
<a class="link" href="cogl-General-API.html#CoglFuncPtr" title="CoglFuncPtr ()"><span class="returnvalue">CoglFuncPtr</span></a> <a class="link" href="cogl-General-API.html#cogl-get-proc-address" title="cogl_get_proc_address ()">cogl_get_proc_address</a> (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>);
<span class="returnvalue">GOptionGroup</span> * <a class="link" href="cogl-General-API.html#cogl-get-option-group" title="cogl_get_option_group ()">cogl_get_option_group</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-push-matrix" title="cogl_push_matrix ()">cogl_push_matrix</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-pop-matrix" title="cogl_pop_matrix ()">cogl_pop_matrix</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-scale" title="cogl_scale ()">cogl_scale</a> (<em class="parameter"><code><span class="type">float</span> x</code></em>,
<em class="parameter"><code><span class="type">float</span> y</code></em>,
<em class="parameter"><code><span class="type">float</span> z</code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-translate" title="cogl_translate ()">cogl_translate</a> (<em class="parameter"><code><span class="type">float</span> x</code></em>,
<em class="parameter"><code><span class="type">float</span> y</code></em>,
<em class="parameter"><code><span class="type">float</span> z</code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-rotate" title="cogl_rotate ()">cogl_rotate</a> (<em class="parameter"><code><span class="type">float</span> angle</code></em>,
<em class="parameter"><code><span class="type">float</span> x</code></em>,
<em class="parameter"><code><span class="type">float</span> y</code></em>,
<em class="parameter"><code><span class="type">float</span> z</code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-transform" title="cogl_transform ()">cogl_transform</a> (<em class="parameter"><code>const <a class="link" href="cogl-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *matrix</code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-frustum" title="cogl_frustum ()">cogl_frustum</a> (<em class="parameter"><code><span class="type">float</span> left</code></em>,
<em class="parameter"><code><span class="type">float</span> right</code></em>,
<em class="parameter"><code><span class="type">float</span> bottom</code></em>,
<em class="parameter"><code><span class="type">float</span> top</code></em>,
<em class="parameter"><code><span class="type">float</span> z_near</code></em>,
<em class="parameter"><code><span class="type">float</span> z_far</code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-perspective" title="cogl_perspective ()">cogl_perspective</a> (<em class="parameter"><code><span class="type">float</span> fovy</code></em>,
<em class="parameter"><code><span class="type">float</span> aspect</code></em>,
<em class="parameter"><code><span class="type">float</span> z_near</code></em>,
<em class="parameter"><code><span class="type">float</span> z_far</code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-ortho" title="cogl_ortho ()">cogl_ortho</a> (<em class="parameter"><code><span class="type">float</span> left</code></em>,
<em class="parameter"><code><span class="type">float</span> right</code></em>,
<em class="parameter"><code><span class="type">float</span> bottom</code></em>,
<em class="parameter"><code><span class="type">float</span> top</code></em>,
<em class="parameter"><code><span class="type">float</span> near</code></em>,
<em class="parameter"><code><span class="type">float</span> far</code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-get-modelview-matrix" title="cogl_get_modelview_matrix ()">cogl_get_modelview_matrix</a> (<em class="parameter"><code><a class="link" href="cogl-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *matrix</code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-set-modelview-matrix" title="cogl_set_modelview_matrix ()">cogl_set_modelview_matrix</a> (<em class="parameter"><code><a class="link" href="cogl-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *matrix</code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-get-projection-matrix" title="cogl_get_projection_matrix ()">cogl_get_projection_matrix</a> (<em class="parameter"><code><a class="link" href="cogl-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *matrix</code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-set-projection-matrix" title="cogl_set_projection_matrix ()">cogl_set_projection_matrix</a> (<em class="parameter"><code><a class="link" href="cogl-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *matrix</code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-set-viewport" title="cogl_set_viewport ()">cogl_set_viewport</a> (<em class="parameter"><code><span class="type">int</span> x</code></em>,
<em class="parameter"><code><span class="type">int</span> y</code></em>,
<em class="parameter"><code><span class="type">int</span> width</code></em>,
<em class="parameter"><code><span class="type">int</span> height</code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-get-viewport" title="cogl_get_viewport ()">cogl_get_viewport</a> (<em class="parameter"><code><span class="type">float</span> v[4]</code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-clear" title="cogl_clear ()">cogl_clear</a> (<em class="parameter"><code>const <a class="link" href="cogl-Color-Type.html#CoglColor" title="struct CoglColor"><span class="type">CoglColor</span></a> *color</code></em>,
<em class="parameter"><code><span class="type">unsigned long </span> buffers</code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-set-backface-culling-enabled" title="cogl_set_backface_culling_enabled ()">cogl_set_backface_culling_enabled</a> (<em class="parameter"><code><span class="type">CoglBool</span> setting</code></em>);
<span class="returnvalue">CoglBool</span> <a class="link" href="cogl-General-API.html#cogl-get-backface-culling-enabled" title="cogl_get_backface_culling_enabled ()">cogl_get_backface_culling_enabled</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
enum <a class="link" href="cogl-General-API.html#CoglFogMode" title="enum CoglFogMode">CoglFogMode</a>;
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-set-fog" title="cogl_set_fog ()">cogl_set_fog</a> (<em class="parameter"><code>const <a class="link" href="cogl-Color-Type.html#CoglColor" title="struct CoglColor"><span class="type">CoglColor</span></a> *fog_color</code></em>,
<em class="parameter"><code><a class="link" href="cogl-General-API.html#CoglFogMode" title="enum CoglFogMode"><span class="type">CoglFogMode</span></a> mode</code></em>,
<em class="parameter"><code><span class="type">float</span> density</code></em>,
<em class="parameter"><code><span class="type">float</span> z_near</code></em>,
<em class="parameter"><code><span class="type">float</span> z_far</code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-disable-fog" title="cogl_disable_fog ()">cogl_disable_fog</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-set-source" title="cogl_set_source ()">cogl_set_source</a> (<em class="parameter"><code><span class="type">void</span> *material</code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-set-source-color" title="cogl_set_source_color ()">cogl_set_source_color</a> (<em class="parameter"><code>const <a class="link" href="cogl-Color-Type.html#CoglColor" title="struct CoglColor"><span class="type">CoglColor</span></a> *color</code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-set-source-color4ub" title="cogl_set_source_color4ub ()">cogl_set_source_color4ub</a> (<em class="parameter"><code><span class="type">uint8_t</span> red</code></em>,
<em class="parameter"><code><span class="type">uint8_t</span> green</code></em>,
<em class="parameter"><code><span class="type">uint8_t</span> blue</code></em>,
<em class="parameter"><code><span class="type">uint8_t</span> alpha</code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-set-source-color4f" title="cogl_set_source_color4f ()">cogl_set_source_color4f</a> (<em class="parameter"><code><span class="type">float</span> red</code></em>,
<em class="parameter"><code><span class="type">float</span> green</code></em>,
<em class="parameter"><code><span class="type">float</span> blue</code></em>,
<em class="parameter"><code><span class="type">float</span> alpha</code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-set-source-texture" title="cogl_set_source_texture ()">cogl_set_source_texture</a> (<em class="parameter"><code><span class="type">CoglTexture</span> *texture</code></em>);
<span class="returnvalue">void</span> * <a class="link" href="cogl-General-API.html#cogl-get-source" title="cogl_get_source ()">cogl_get_source</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-push-source" title="cogl_push_source ()">cogl_push_source</a> (<em class="parameter"><code><span class="type">void</span> *material</code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-pop-source" title="cogl_pop_source ()">cogl_pop_source</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
enum <a class="link" href="cogl-General-API.html#CoglReadPixelsFlags" title="enum CoglReadPixelsFlags">CoglReadPixelsFlags</a>;
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-read-pixels" title="cogl_read_pixels ()">cogl_read_pixels</a> (<em class="parameter"><code><span class="type">int</span> x</code></em>,
<em class="parameter"><code><span class="type">int</span> y</code></em>,
<em class="parameter"><code><span class="type">int</span> width</code></em>,
<em class="parameter"><code><span class="type">int</span> height</code></em>,
<em class="parameter"><code><a class="link" href="cogl-General-API.html#CoglReadPixelsFlags" title="enum CoglReadPixelsFlags"><span class="type">CoglReadPixelsFlags</span></a> source</code></em>,
<em class="parameter"><code><a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="type">CoglPixelFormat</span></a> format</code></em>,
<em class="parameter"><code><span class="type">uint8_t</span> *pixels</code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-flush" title="cogl_flush ()">cogl_flush</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-begin-gl" title="cogl_begin_gl ()">cogl_begin_gl</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span> <a class="link" href="cogl-General-API.html#cogl-end-gl" title="cogl_end_gl ()">cogl_end_gl</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
</pre>
</div>
<div class="refsect1">
<a name="cogl-General-API.description"></a><h2>Description</h2>
<p>
General utility functions for COGL.
</p>
</div>
<div class="refsect1">
<a name="cogl-General-API.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="CoglObject"></a><h3>CoglObject</h3>
<pre class="programlisting">typedef struct _CoglObject CoglObject;</pre>
</div>
<hr>
<div class="refsect2">
<a name="cogl-object-ref"></a><h3>cogl_object_ref ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> * cogl_object_ref (<em class="parameter"><code><span class="type">void</span> *object</code></em>);</pre>
<p>
Increases the reference count of <em class="parameter"><code>object</code></em> by 1
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-General-API.html#CoglObject" title="CoglObject"><span class="type">CoglObject</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <em class="parameter"><code>object</code></em>, with its reference count increased</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-object-unref"></a><h3>cogl_object_unref ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_object_unref (<em class="parameter"><code><span class="type">void</span> *object</code></em>);</pre>
<p>
Drecreases the reference count of <em class="parameter"><code>object</code></em> by 1; if the reference
count reaches 0, the resources allocated by <em class="parameter"><code>object</code></em> will be freed
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-General-API.html#CoglObject" title="CoglObject"><span class="type">CoglObject</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="CoglUserDataKey"></a><h3>CoglUserDataKey</h3>
<pre class="programlisting">typedef struct {
int unused;
} CoglUserDataKey;
</pre>
<p>
A <a class="link" href="cogl-General-API.html#CoglUserDataKey" title="CoglUserDataKey"><span class="type">CoglUserDataKey</span></a> is used to declare a key for attaching data to a
<a class="link" href="cogl-General-API.html#CoglObject" title="CoglObject"><span class="type">CoglObject</span></a> using cogl_object_set_user_data. The typedef only exists as a
formality to make code self documenting since only the unique address of a
<a class="link" href="cogl-General-API.html#CoglUserDataKey" title="CoglUserDataKey"><span class="type">CoglUserDataKey</span></a> is used.
</p>
<p>
Typically you would declare a static <a class="link" href="cogl-General-API.html#CoglUserDataKey" title="CoglUserDataKey"><span class="type">CoglUserDataKey</span></a> and set private data
on an object something like this:
</p>
<p>
</p>
<div class="informalexample"><pre class="programlisting">
static CoglUserDataKey path_private_key;
static void
destroy_path_private_cb (void *data)
{
g_free (data);
}
static void
my_path_set_data (CoglPath *path, void *data)
{
cogl_object_set_user_data (COGL_OBJECT (path),
&private_key,
data,
destroy_path_private_cb);
}
</pre></div>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="type">int</span> <em class="structfield"><code><a name="CoglUserDataKey.unused"></a>unused</code></em>;</span></p></td>
<td>ignored.</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.4</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-object-get-user-data"></a><h3>cogl_object_get_user_data ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> * cogl_object_get_user_data (<em class="parameter"><code><a class="link" href="cogl-General-API.html#CoglObject" title="CoglObject"><span class="type">CoglObject</span></a> *object</code></em>,
<em class="parameter"><code><a class="link" href="cogl-General-API.html#CoglUserDataKey" title="CoglUserDataKey"><span class="type">CoglUserDataKey</span></a> *key</code></em>);</pre>
<p>
Finds the user data previously associated with <em class="parameter"><code>object</code></em> using
the given <em class="parameter"><code>key</code></em>. If no user data has been associated with <em class="parameter"><code>object</code></em>
for the given <em class="parameter"><code>key</code></em> this function returns NULL.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>The object with associated private data to query</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>The address of a <a class="link" href="cogl-General-API.html#CoglUserDataKey" title="CoglUserDataKey"><span class="type">CoglUserDataKey</span></a> which provides a unique value
with which to index the private data.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The user data previously associated
with <em class="parameter"><code>object</code></em> using the given <em class="parameter"><code>key</code></em>; or <code class="literal">NULL</code> if no associated
data is found. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.4</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-object-set-user-data"></a><h3>cogl_object_set_user_data ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_object_set_user_data (<em class="parameter"><code><a class="link" href="cogl-General-API.html#CoglObject" title="CoglObject"><span class="type">CoglObject</span></a> *object</code></em>,
<em class="parameter"><code><a class="link" href="cogl-General-API.html#CoglUserDataKey" title="CoglUserDataKey"><span class="type">CoglUserDataKey</span></a> *key</code></em>,
<em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
<em class="parameter"><code><span class="type">CoglUserDataDestroyCallback</span> destroy</code></em>);</pre>
<p>
Associates some private <em class="parameter"><code>user_data</code></em> with a given <a class="link" href="cogl-General-API.html#CoglObject" title="CoglObject"><span class="type">CoglObject</span></a>. To
later remove the association call <a class="link" href="cogl-General-API.html#cogl-object-set-user-data" title="cogl_object_set_user_data ()"><code class="function">cogl_object_set_user_data()</code></a> with
the same <em class="parameter"><code>key</code></em> but NULL for the <em class="parameter"><code>user_data</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>The object to associate private data with</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>The address of a <a class="link" href="cogl-General-API.html#CoglUserDataKey" title="CoglUserDataKey"><span class="type">CoglUserDataKey</span></a> which provides a unique value
with which to index the private data.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>The data to associate with the given object,
or <code class="literal">NULL</code> to remove a previous association.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
<td>A <span class="type">CoglUserDataDestroyCallback</span> to call if the object is
destroyed or if the association is removed by later setting
<code class="literal">NULL</code> data for the same key.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.4</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-INVALID-HANDLE:CAPS"></a><h3>COGL_INVALID_HANDLE</h3>
<pre class="programlisting">#define COGL_INVALID_HANDLE NULL
</pre>
<p>
A COGL handle that is not valid, used for unitialized handles as well as
error conditions.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CoglHandle"></a><h3>CoglHandle</h3>
<pre class="programlisting">typedef void * CoglHandle;
</pre>
<p>
Type used for storing references to cogl objects, the CoglHandle is
a fully opaque type without any public data members.
</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-handle-ref"></a><h3>cogl_handle_ref ()</h3>
<pre class="programlisting"><a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> cogl_handle_ref (<em class="parameter"><code><a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="type">CoglHandle</span></a> handle</code></em>);</pre>
<p>
Increases the reference count of <em class="parameter"><code>handle</code></em> by 1
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="type">CoglHandle</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the handle, with its reference count increased. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-handle-unref"></a><h3>cogl_handle_unref ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_handle_unref (<em class="parameter"><code><a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="type">CoglHandle</span></a> handle</code></em>);</pre>
<p>
Drecreases the reference count of <em class="parameter"><code>handle</code></em> by 1; if the reference
count reaches 0, the resources allocated by <em class="parameter"><code>handle</code></em> will be freed
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="type">CoglHandle</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="CoglFuncPtr"></a><h3>CoglFuncPtr ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> (*CoglFuncPtr) (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
The type used by cogl for function pointers, note that this type
is used as a generic catch-all cast for function pointers and the
actual arguments and return type may be different.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CoglPixelFormat"></a><h3>enum CoglPixelFormat</h3>
<pre class="programlisting">typedef enum {
/*< prefix=COGL_PIXEL_FORMAT >*/
COGL_PIXEL_FORMAT_ANY = 0,
COGL_PIXEL_FORMAT_A_8 = 1 | COGL_A_BIT,
COGL_PIXEL_FORMAT_RGB_565 = 4,
COGL_PIXEL_FORMAT_RGBA_4444 = 5 | COGL_A_BIT,
COGL_PIXEL_FORMAT_RGBA_5551 = 6 | COGL_A_BIT,
COGL_PIXEL_FORMAT_YUV = 7,
COGL_PIXEL_FORMAT_G_8 = 8,
COGL_PIXEL_FORMAT_RGB_888 = 2,
COGL_PIXEL_FORMAT_BGR_888 = (2 | COGL_BGR_BIT),
COGL_PIXEL_FORMAT_RGBA_8888 = (3 | COGL_A_BIT),
COGL_PIXEL_FORMAT_BGRA_8888 = (3 | COGL_A_BIT | COGL_BGR_BIT),
COGL_PIXEL_FORMAT_ARGB_8888 = (3 | COGL_A_BIT | COGL_AFIRST_BIT),
COGL_PIXEL_FORMAT_ABGR_8888 = (3 | COGL_A_BIT | COGL_BGR_BIT | COGL_AFIRST_BIT),
COGL_PIXEL_FORMAT_RGBA_1010102 = (13 | COGL_A_BIT),
COGL_PIXEL_FORMAT_BGRA_1010102 = (13 | COGL_A_BIT | COGL_BGR_BIT),
COGL_PIXEL_FORMAT_ARGB_2101010 = (13 | COGL_A_BIT | COGL_AFIRST_BIT),
COGL_PIXEL_FORMAT_ABGR_2101010 = (13 | COGL_A_BIT | COGL_BGR_BIT | COGL_AFIRST_BIT),
COGL_PIXEL_FORMAT_RGBA_8888_PRE = (3 | COGL_A_BIT | COGL_PREMULT_BIT),
COGL_PIXEL_FORMAT_BGRA_8888_PRE = (3 | COGL_A_BIT | COGL_PREMULT_BIT | COGL_BGR_BIT),
COGL_PIXEL_FORMAT_ARGB_8888_PRE = (3 | COGL_A_BIT | COGL_PREMULT_BIT | COGL_AFIRST_BIT),
COGL_PIXEL_FORMAT_ABGR_8888_PRE = (3 | COGL_A_BIT | COGL_PREMULT_BIT | COGL_BGR_BIT | COGL_AFIRST_BIT),
COGL_PIXEL_FORMAT_RGBA_4444_PRE = (COGL_PIXEL_FORMAT_RGBA_4444 | COGL_A_BIT | COGL_PREMULT_BIT),
COGL_PIXEL_FORMAT_RGBA_5551_PRE = (COGL_PIXEL_FORMAT_RGBA_5551 | COGL_A_BIT | COGL_PREMULT_BIT),
COGL_PIXEL_FORMAT_RGBA_1010102_PRE = (COGL_PIXEL_FORMAT_RGBA_1010102 | COGL_PREMULT_BIT),
COGL_PIXEL_FORMAT_BGRA_1010102_PRE = (COGL_PIXEL_FORMAT_BGRA_1010102 | COGL_PREMULT_BIT),
COGL_PIXEL_FORMAT_ARGB_2101010_PRE = (COGL_PIXEL_FORMAT_ARGB_2101010 | COGL_PREMULT_BIT),
COGL_PIXEL_FORMAT_ABGR_2101010_PRE = (COGL_PIXEL_FORMAT_ABGR_2101010 | COGL_PREMULT_BIT),
COGL_PIXEL_FORMAT_DEPTH_16 = (9 | COGL_DEPTH_BIT),
COGL_PIXEL_FORMAT_DEPTH_32 = (3 | COGL_DEPTH_BIT),
COGL_PIXEL_FORMAT_DEPTH_24_STENCIL_8 = (3 | COGL_DEPTH_BIT | COGL_STENCIL_BIT)
} CoglPixelFormat;
</pre>
<p>
Pixel formats used by Cogl. For the formats with a byte per
component, the order of the components specify the order in
increasing memory addresses. So for example
<a class="link" href="cogl-General-API.html#COGL-PIXEL-FORMAT-RGB-888:CAPS"><code class="literal">COGL_PIXEL_FORMAT_RGB_888</code></a> would have the red component in the
lowest address, green in the next address and blue after that
regardless of the endianness of the system.
</p>
<p>
For the formats with non byte aligned components the component
order specifies the order within a 16-bit or 32-bit number from
most significant bit to least significant. So for
<a class="link" href="cogl-General-API.html#COGL-PIXEL-FORMAT-RGB-565:CAPS"><code class="literal">COGL_PIXEL_FORMAT_RGB_565</code></a>, the red component would be in bits
11-15, the green component would be in 6-11 and the blue component
would be in 1-5. Therefore the order in memory depends on the
endianness of the system.
</p>
<p>
When uploading a texture <a class="link" href="cogl-General-API.html#COGL-PIXEL-FORMAT-ANY:CAPS"><code class="literal">COGL_PIXEL_FORMAT_ANY</code></a> can be used as the
internal format. Cogl will try to pick the best format to use
internally and convert the texture data if necessary.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-ANY:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_ANY</code></span></p></td>
<td>Any format
</td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-A-8:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_A_8</code></span></p></td>
<td>8 bits alpha mask
</td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-RGB-565:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_RGB_565</code></span></p></td>
<td>RGB, 16 bits
</td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-RGBA-4444:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_RGBA_4444</code></span></p></td>
<td>RGBA, 16 bits
</td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-RGBA-5551:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_RGBA_5551</code></span></p></td>
<td>RGBA, 16 bits
</td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-YUV:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_YUV</code></span></p></td>
<td>Not currently supported
</td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-G-8:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_G_8</code></span></p></td>
<td>Single luminance component
</td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-RGB-888:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_RGB_888</code></span></p></td>
<td>RGB, 24 bits
</td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-BGR-888:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_BGR_888</code></span></p></td>
<td>BGR, 24 bits
</td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-RGBA-8888:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_RGBA_8888</code></span></p></td>
<td>RGBA, 32 bits
</td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-BGRA-8888:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_BGRA_8888</code></span></p></td>
<td>BGRA, 32 bits
</td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-ARGB-8888:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_ARGB_8888</code></span></p></td>
<td>ARGB, 32 bits
</td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-ABGR-8888:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_ABGR_8888</code></span></p></td>
<td>ABGR, 32 bits
</td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-RGBA-1010102:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_RGBA_1010102</code></span></p></td>
<td>RGBA, 32 bits, 10 bpc
</td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-BGRA-1010102:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_BGRA_1010102</code></span></p></td>
<td>BGRA, 32 bits, 10 bpc
</td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-ARGB-2101010:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_ARGB_2101010</code></span></p></td>
<td>ARGB, 32 bits, 10 bpc
</td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-ABGR-2101010:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_ABGR_2101010</code></span></p></td>
<td>ABGR, 32 bits, 10 bpc
</td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-RGBA-8888-PRE:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_RGBA_8888_PRE</code></span></p></td>
<td>Premultiplied RGBA, 32 bits
</td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-BGRA-8888-PRE:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_BGRA_8888_PRE</code></span></p></td>
<td>Premultiplied BGRA, 32 bits
</td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-ARGB-8888-PRE:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_ARGB_8888_PRE</code></span></p></td>
<td>Premultiplied ARGB, 32 bits
</td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-ABGR-8888-PRE:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_ABGR_8888_PRE</code></span></p></td>
<td>Premultiplied ABGR, 32 bits
</td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-RGBA-4444-PRE:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_RGBA_4444_PRE</code></span></p></td>
<td>Premultiplied RGBA, 16 bits
</td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-RGBA-5551-PRE:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_RGBA_5551_PRE</code></span></p></td>
<td>Premultiplied RGBA, 16 bits
</td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-RGBA-1010102-PRE:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_RGBA_1010102_PRE</code></span></p></td>
<td>Premultiplied RGBA, 32 bits, 10 bpc
</td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-BGRA-1010102-PRE:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_BGRA_1010102_PRE</code></span></p></td>
<td>Premultiplied BGRA, 32 bits, 10 bpc
</td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-ARGB-2101010-PRE:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_ARGB_2101010_PRE</code></span></p></td>
<td>Premultiplied ARGB, 32 bits, 10 bpc
</td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-ABGR-2101010-PRE:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_ABGR_2101010_PRE</code></span></p></td>
<td>Premultiplied ABGR, 32 bits, 10 bpc
</td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-DEPTH-16:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_DEPTH_16</code></span></p></td>
<td></td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-DEPTH-32:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_DEPTH_32</code></span></p></td>
<td></td>
</tr>
<tr>
<td><p><a name="COGL-PIXEL-FORMAT-DEPTH-24-STENCIL-8:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_DEPTH_24_STENCIL_8</code></span></p></td>
<td></td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.8</p>
</div>
<hr>
<div class="refsect2">
<a name="CoglBufferTarget"></a><h3>enum CoglBufferTarget</h3>
<pre class="programlisting">typedef enum {
COGL_WINDOW_BUFFER = (1 << 1),
COGL_OFFSCREEN_BUFFER = (1 << 2)
} CoglBufferTarget;
</pre>
<p>
Target flags for FBOs.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="COGL-WINDOW-BUFFER:CAPS"></a><span class="term"><code class="literal">COGL_WINDOW_BUFFER</code></span></p></td>
<td>FIXME
</td>
</tr>
<tr>
<td><p><a name="COGL-OFFSCREEN-BUFFER:CAPS"></a><span class="term"><code class="literal">COGL_OFFSCREEN_BUFFER</code></span></p></td>
<td>FIXME
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.8</p>
</div>
<hr>
<div class="refsect2">
<a name="CoglBufferBit"></a><h3>enum CoglBufferBit</h3>
<pre class="programlisting">typedef enum {
COGL_BUFFER_BIT_COLOR = 1L<<0,
COGL_BUFFER_BIT_DEPTH = 1L<<1,
COGL_BUFFER_BIT_STENCIL = 1L<<2
} CoglBufferBit;
</pre>
<p>
Types of auxiliary buffers
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="COGL-BUFFER-BIT-COLOR:CAPS"></a><span class="term"><code class="literal">COGL_BUFFER_BIT_COLOR</code></span></p></td>
<td>Selects the primary color buffer
</td>
</tr>
<tr>
<td><p><a name="COGL-BUFFER-BIT-DEPTH:CAPS"></a><span class="term"><code class="literal">COGL_BUFFER_BIT_DEPTH</code></span></p></td>
<td>Selects the depth buffer
</td>
</tr>
<tr>
<td><p><a name="COGL-BUFFER-BIT-STENCIL:CAPS"></a><span class="term"><code class="literal">COGL_BUFFER_BIT_STENCIL</code></span></p></td>
<td>Selects the stencil buffer
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="CoglAttributeType"></a><h3>enum CoglAttributeType</h3>
<pre class="programlisting">typedef enum {
COGL_ATTRIBUTE_TYPE_BYTE = 0x1400,
COGL_ATTRIBUTE_TYPE_UNSIGNED_BYTE = 0x1401,
COGL_ATTRIBUTE_TYPE_SHORT = 0x1402,
COGL_ATTRIBUTE_TYPE_UNSIGNED_SHORT = 0x1403,
COGL_ATTRIBUTE_TYPE_FLOAT = 0x1406
} CoglAttributeType;
</pre>
<p>
Data types for the components of a vertex attribute.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="COGL-ATTRIBUTE-TYPE-BYTE:CAPS"></a><span class="term"><code class="literal">COGL_ATTRIBUTE_TYPE_BYTE</code></span></p></td>
<td>Data is the same size of a byte
</td>
</tr>
<tr>
<td><p><a name="COGL-ATTRIBUTE-TYPE-UNSIGNED-BYTE:CAPS"></a><span class="term"><code class="literal">COGL_ATTRIBUTE_TYPE_UNSIGNED_BYTE</code></span></p></td>
<td>Data is the same size of an
unsigned byte
</td>
</tr>
<tr>
<td><p><a name="COGL-ATTRIBUTE-TYPE-SHORT:CAPS"></a><span class="term"><code class="literal">COGL_ATTRIBUTE_TYPE_SHORT</code></span></p></td>
<td>Data is the same size of a short integer
</td>
</tr>
<tr>
<td><p><a name="COGL-ATTRIBUTE-TYPE-UNSIGNED-SHORT:CAPS"></a><span class="term"><code class="literal">COGL_ATTRIBUTE_TYPE_UNSIGNED_SHORT</code></span></p></td>
<td>Data is the same size of
an unsigned short integer
</td>
</tr>
<tr>
<td><p><a name="COGL-ATTRIBUTE-TYPE-FLOAT:CAPS"></a><span class="term"><code class="literal">COGL_ATTRIBUTE_TYPE_FLOAT</code></span></p></td>
<td>Data is the same size of a float
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="CoglFeatureFlags"></a><h3>enum CoglFeatureFlags</h3>
<pre class="programlisting">typedef enum {
COGL_FEATURE_TEXTURE_RECTANGLE = (1 << 1),
COGL_FEATURE_TEXTURE_NPOT = (1 << 2),
COGL_FEATURE_TEXTURE_YUV = (1 << 3),
COGL_FEATURE_TEXTURE_READ_PIXELS = (1 << 4),
COGL_FEATURE_SHADERS_GLSL = (1 << 5),
COGL_FEATURE_OFFSCREEN = (1 << 6),
COGL_FEATURE_OFFSCREEN_MULTISAMPLE = (1 << 7),
COGL_FEATURE_OFFSCREEN_BLIT = (1 << 8),
COGL_FEATURE_FOUR_CLIP_PLANES = (1 << 9),
COGL_FEATURE_STENCIL_BUFFER = (1 << 10),
COGL_FEATURE_VBOS = (1 << 11),
COGL_FEATURE_PBOS = (1 << 12),
COGL_FEATURE_UNSIGNED_INT_INDICES = (1 << 13),
COGL_FEATURE_DEPTH_RANGE = (1 << 14),
COGL_FEATURE_TEXTURE_NPOT_BASIC = (1 << 15),
COGL_FEATURE_TEXTURE_NPOT_MIPMAP = (1 << 16),
COGL_FEATURE_TEXTURE_NPOT_REPEAT = (1 << 17),
COGL_FEATURE_POINT_SPRITE = (1 << 18),
COGL_FEATURE_TEXTURE_3D = (1 << 19),
COGL_FEATURE_SHADERS_ARBFP = (1 << 20),
COGL_FEATURE_MAP_BUFFER_FOR_READ = (1 << 21),
COGL_FEATURE_MAP_BUFFER_FOR_WRITE = (1 << 22),
COGL_FEATURE_ONSCREEN_MULTIPLE = (1 << 23),
COGL_FEATURE_DEPTH_TEXTURE = (1 << 24)
} CoglFeatureFlags;
</pre>
<p>
Flags for the supported features.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="COGL-FEATURE-TEXTURE-RECTANGLE:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_TEXTURE_RECTANGLE</code></span></p></td>
<td>ARB_texture_rectangle support
</td>
</tr>
<tr>
<td><p><a name="COGL-FEATURE-TEXTURE-NPOT:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_TEXTURE_NPOT</code></span></p></td>
<td>Non power of two textures are supported
by the hardware. This is a equivalent to the
<a class="link" href="cogl-General-API.html#COGL-FEATURE-TEXTURE-NPOT-BASIC:CAPS"><code class="literal">COGL_FEATURE_TEXTURE_NPOT_BASIC</code></a>, <a class="link" href="cogl-General-API.html#COGL-FEATURE-TEXTURE-NPOT-MIPMAP:CAPS"><code class="literal">COGL_FEATURE_TEXTURE_NPOT_MIPMAP</code></a>
and <a class="link" href="cogl-General-API.html#COGL-FEATURE-TEXTURE-NPOT-REPEAT:CAPS"><code class="literal">COGL_FEATURE_TEXTURE_NPOT_REPEAT</code></a> features combined.
</td>
</tr>
<tr>
<td><p><a name="COGL-FEATURE-TEXTURE-YUV:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_TEXTURE_YUV</code></span></p></td>
<td>ycbcr conversion support
</td>
</tr>
<tr>
<td><p><a name="COGL-FEATURE-TEXTURE-READ-PIXELS:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_TEXTURE_READ_PIXELS</code></span></p></td>
<td>glReadPixels() support
</td>
</tr>
<tr>
<td><p><a name="COGL-FEATURE-SHADERS-GLSL:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_SHADERS_GLSL</code></span></p></td>
<td>GLSL support
</td>
</tr>
<tr>
<td><p><a name="COGL-FEATURE-OFFSCREEN:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_OFFSCREEN</code></span></p></td>
<td>FBO support
</td>
</tr>
<tr>
<td><p><a name="COGL-FEATURE-OFFSCREEN-MULTISAMPLE:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_OFFSCREEN_MULTISAMPLE</code></span></p></td>
<td>Multisample support on FBOs
</td>
</tr>
<tr>
<td><p><a name="COGL-FEATURE-OFFSCREEN-BLIT:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_OFFSCREEN_BLIT</code></span></p></td>
<td>Blit support on FBOs
</td>
</tr>
<tr>
<td><p><a name="COGL-FEATURE-FOUR-CLIP-PLANES:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_FOUR_CLIP_PLANES</code></span></p></td>
<td>At least 4 clip planes available
</td>
</tr>
<tr>
<td><p><a name="COGL-FEATURE-STENCIL-BUFFER:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_STENCIL_BUFFER</code></span></p></td>
<td>Stencil buffer support
</td>
</tr>
<tr>
<td><p><a name="COGL-FEATURE-VBOS:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_VBOS</code></span></p></td>
<td>VBO support
</td>
</tr>
<tr>
<td><p><a name="COGL-FEATURE-PBOS:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_PBOS</code></span></p></td>
<td>PBO support
</td>
</tr>
<tr>
<td><p><a name="COGL-FEATURE-UNSIGNED-INT-INDICES:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_UNSIGNED_INT_INDICES</code></span></p></td>
<td>Set if
<a class="link" href="cogl-Vertex-Buffers.html#COGL-INDICES-TYPE-UNSIGNED-INT:CAPS"><code class="literal">COGL_INDICES_TYPE_UNSIGNED_INT</code></a> is supported in
<a class="link" href="cogl-Vertex-Buffers.html#cogl-vertex-buffer-indices-new" title="cogl_vertex_buffer_indices_new ()"><code class="function">cogl_vertex_buffer_indices_new()</code></a>.
</td>
</tr>
<tr>
<td><p><a name="COGL-FEATURE-DEPTH-RANGE:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_DEPTH_RANGE</code></span></p></td>
<td>cogl_material_set_depth_range() support
</td>
</tr>
<tr>
<td><p><a name="COGL-FEATURE-TEXTURE-NPOT-BASIC:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_TEXTURE_NPOT_BASIC</code></span></p></td>
<td>The hardware supports non power
of two textures, but you also need to check the
<a class="link" href="cogl-General-API.html#COGL-FEATURE-TEXTURE-NPOT-MIPMAP:CAPS"><code class="literal">COGL_FEATURE_TEXTURE_NPOT_MIPMAP</code></a> and <a class="link" href="cogl-General-API.html#COGL-FEATURE-TEXTURE-NPOT-REPEAT:CAPS"><code class="literal">COGL_FEATURE_TEXTURE_NPOT_REPEAT</code></a>
features to know if the hardware supports npot texture mipmaps
or repeat modes other than
<code class="literal">COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE</code> respectively.
</td>
</tr>
<tr>
<td><p><a name="COGL-FEATURE-TEXTURE-NPOT-MIPMAP:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_TEXTURE_NPOT_MIPMAP</code></span></p></td>
<td>Mipmapping is supported in
conjuntion with non power of two textures.
</td>
</tr>
<tr>
<td><p><a name="COGL-FEATURE-TEXTURE-NPOT-REPEAT:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_TEXTURE_NPOT_REPEAT</code></span></p></td>
<td>Repeat modes other than
<code class="literal">COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE</code> are supported by the
hardware.
</td>
</tr>
<tr>
<td><p><a name="COGL-FEATURE-POINT-SPRITE:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_POINT_SPRITE</code></span></p></td>
<td>Whether
<a class="link" href="cogl-Materials.html#cogl-material-set-layer-point-sprite-coords-enabled" title="cogl_material_set_layer_point_sprite_coords_enabled ()"><code class="function">cogl_material_set_layer_point_sprite_coords_enabled()</code></a> is supported.
</td>
</tr>
<tr>
<td><p><a name="COGL-FEATURE-TEXTURE-3D:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_TEXTURE_3D</code></span></p></td>
<td>3D texture support
</td>
</tr>
<tr>
<td><p><a name="COGL-FEATURE-SHADERS-ARBFP:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_SHADERS_ARBFP</code></span></p></td>
<td>ARBFP support
</td>
</tr>
<tr>
<td><p><a name="COGL-FEATURE-MAP-BUFFER-FOR-READ:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_MAP_BUFFER_FOR_READ</code></span></p></td>
<td>Whether <a class="link" href="cogl-Buffers.html#cogl-buffer-map" title="cogl_buffer_map ()"><code class="function">cogl_buffer_map()</code></a> is
supported with CoglBufferAccess including read support.
</td>
</tr>
<tr>
<td><p><a name="COGL-FEATURE-MAP-BUFFER-FOR-WRITE:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_MAP_BUFFER_FOR_WRITE</code></span></p></td>
<td>Whether <a class="link" href="cogl-Buffers.html#cogl-buffer-map" title="cogl_buffer_map ()"><code class="function">cogl_buffer_map()</code></a> is
supported with CoglBufferAccess including write support.
</td>
</tr>
<tr>
<td><p><a name="COGL-FEATURE-ONSCREEN-MULTIPLE:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_ONSCREEN_MULTIPLE</code></span></p></td>
<td></td>
</tr>
<tr>
<td><p><a name="COGL-FEATURE-DEPTH-TEXTURE:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_DEPTH_TEXTURE</code></span></p></td>
<td>Whether <span class="type">CoglFramebuffer</span> support rendering the
depth buffer to a texture.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.8</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-get-features"></a><h3>cogl_get_features ()</h3>
<pre class="programlisting"><a class="link" href="cogl-General-API.html#CoglFeatureFlags" title="enum CoglFeatureFlags"><span class="returnvalue">CoglFeatureFlags</span></a> cogl_get_features (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_get_features</code> has been deprecated since version 1.10 and should not be used in newly-written code. Use <code class="function">cogl_foreach_feature()</code> instead</p>
</div>
<p>
Returns all of the features supported by COGL.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A logical OR of all the supported COGL features.</td>
</tr></tbody>
</table></div>
<p class="since">Since 0.8</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-features-available"></a><h3>cogl_features_available ()</h3>
<pre class="programlisting"><span class="returnvalue">CoglBool</span> cogl_features_available (<em class="parameter"><code><a class="link" href="cogl-General-API.html#CoglFeatureFlags" title="enum CoglFeatureFlags"><span class="type">CoglFeatureFlags</span></a> features</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_features_available</code> has been deprecated since version 1.10 and should not be used in newly-written code. Use <code class="function">cogl_has_feature()</code> instead</p>
</div>
<p>
Checks whether the given COGL features are available. Multiple
features can be checked for by or-ing them together with the '|'
operator. <code class="literal">TRUE</code> is only returned if all of the requested features
are available.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>features</code></em> :</span></p></td>
<td>A bitmask of features to check for</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<code class="literal">TRUE</code> if the features are available, <code class="literal">FALSE</code> otherwise.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-get-proc-address"></a><h3>cogl_get_proc_address ()</h3>
<pre class="programlisting"><a class="link" href="cogl-General-API.html#CoglFuncPtr" title="CoglFuncPtr ()"><span class="returnvalue">CoglFuncPtr</span></a> cogl_get_proc_address (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
<p>
Gets a pointer to a given GL or GL ES extension function. This acts
as a wrapper around <code class="function">glXGetProcAddress()</code> or whatever is the
appropriate function for the current backend.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>This function should not be used to query core opengl API
symbols since eglGetProcAddress for example doesn't allow this and
and may return a junk pointer if you do.</div>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>the name of the function.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a pointer to the requested function or <code class="literal">NULL</code> if the
function is not available.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-get-option-group"></a><h3>cogl_get_option_group ()</h3>
<pre class="programlisting"><span class="returnvalue">GOptionGroup</span> * cogl_get_option_group (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_get_option_group</code> has been deprecated since version 1.16 and should not be used in newly-written code. Not replaced</p>
</div>
<p>
Retrieves the <span class="type">GOptionGroup</span> used by Cogl to parse the command
line options. Clutter uses this to handle the Cogl command line
options during its initialization process.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <span class="type">GOptionGroup</span>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-push-matrix"></a><h3>cogl_push_matrix ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_push_matrix (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_push_matrix</code> has been deprecated since version 1.10 and should not be used in newly-written code. Use <code class="function">cogl_framebuffer_push_matrix()</code> instead</p>
</div>
<p>
Stores the current model-view matrix on the matrix stack. The matrix
can later be restored with <a class="link" href="cogl-General-API.html#cogl-pop-matrix" title="cogl_pop_matrix ()"><code class="function">cogl_pop_matrix()</code></a>.
</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-pop-matrix"></a><h3>cogl_pop_matrix ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_pop_matrix (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_pop_matrix</code> has been deprecated since version 1.10 and should not be used in newly-written code. Use <code class="function">cogl_framebuffer_pop_matrix()</code> instead</p>
</div>
<p>
Restores the current model-view matrix from the matrix stack.
</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-scale"></a><h3>cogl_scale ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_scale (<em class="parameter"><code><span class="type">float</span> x</code></em>,
<em class="parameter"><code><span class="type">float</span> y</code></em>,
<em class="parameter"><code><span class="type">float</span> z</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_scale</code> has been deprecated since version 1.10 and should not be used in newly-written code. Use <code class="function">cogl_framebuffer_pop_matrix()</code> instead</p>
</div>
<p>
Multiplies the current model-view matrix by one that scales the x,
y and z axes by the given values.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>Amount to scale along the x-axis</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>Amount to scale along the y-axis</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>z</code></em> :</span></p></td>
<td>Amount to scale along the z-axis</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-translate"></a><h3>cogl_translate ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_translate (<em class="parameter"><code><span class="type">float</span> x</code></em>,
<em class="parameter"><code><span class="type">float</span> y</code></em>,
<em class="parameter"><code><span class="type">float</span> z</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_translate</code> has been deprecated since version 1.10 and should not be used in newly-written code. Use <code class="function">cogl_framebuffer_translate()</code> instead</p>
</div>
<p>
Multiplies the current model-view matrix by one that translates the
model along all three axes according to the given values.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>Distance to translate along the x-axis</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>Distance to translate along the y-axis</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>z</code></em> :</span></p></td>
<td>Distance to translate along the z-axis</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-rotate"></a><h3>cogl_rotate ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_rotate (<em class="parameter"><code><span class="type">float</span> angle</code></em>,
<em class="parameter"><code><span class="type">float</span> x</code></em>,
<em class="parameter"><code><span class="type">float</span> y</code></em>,
<em class="parameter"><code><span class="type">float</span> z</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_rotate</code> has been deprecated since version 1.10 and should not be used in newly-written code. Use <code class="function">cogl_framebuffer_rotate()</code> instead</p>
</div>
<p>
Multiplies the current model-view matrix by one that rotates the
model around the vertex specified by <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em> and <em class="parameter"><code>z</code></em>. The rotation
follows the right-hand thumb rule so for example rotating by 10
degrees about the vertex (0, 0, 1) causes a small counter-clockwise
rotation.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>angle</code></em> :</span></p></td>
<td>Angle in degrees to rotate.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>X-component of vertex to rotate around.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>Y-component of vertex to rotate around.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>z</code></em> :</span></p></td>
<td>Z-component of vertex to rotate around.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-transform"></a><h3>cogl_transform ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_transform (<em class="parameter"><code>const <a class="link" href="cogl-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *matrix</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_transform</code> has been deprecated since version 1.10 and should not be used in newly-written code. Use <code class="function">cogl_framebuffer_transform()</code> instead</p>
</div>
<p>
Multiplies the current model-view matrix by the given matrix.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
<td>the matrix to multiply with the current model-view</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.4</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-frustum"></a><h3>cogl_frustum ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_frustum (<em class="parameter"><code><span class="type">float</span> left</code></em>,
<em class="parameter"><code><span class="type">float</span> right</code></em>,
<em class="parameter"><code><span class="type">float</span> bottom</code></em>,
<em class="parameter"><code><span class="type">float</span> top</code></em>,
<em class="parameter"><code><span class="type">float</span> z_near</code></em>,
<em class="parameter"><code><span class="type">float</span> z_far</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_frustum</code> has been deprecated since version 1.10 and should not be used in newly-written code. Use <code class="function">cogl_framebuffer_frustum()</code> instead</p>
</div>
<p>
Replaces the current projection matrix with a perspective matrix
for a given viewing frustum defined by 4 side clip planes that
all cross through the origin and 2 near and far clip planes.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>left</code></em> :</span></p></td>
<td>X position of the left clipping plane where it
intersects the near clipping plane</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>right</code></em> :</span></p></td>
<td>X position of the right clipping plane where it
intersects the near clipping plane</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>bottom</code></em> :</span></p></td>
<td>Y position of the bottom clipping plane where it
intersects the near clipping plane</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>top</code></em> :</span></p></td>
<td>Y position of the top clipping plane where it intersects
the near clipping plane</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>z_near</code></em> :</span></p></td>
<td>The distance to the near clipping plane (Must be positive)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>z_far</code></em> :</span></p></td>
<td>The distance to the far clipping plane (Must be positive)</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.8.2</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-perspective"></a><h3>cogl_perspective ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_perspective (<em class="parameter"><code><span class="type">float</span> fovy</code></em>,
<em class="parameter"><code><span class="type">float</span> aspect</code></em>,
<em class="parameter"><code><span class="type">float</span> z_near</code></em>,
<em class="parameter"><code><span class="type">float</span> z_far</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_perspective</code> has been deprecated since version 1.10 and should not be used in newly-written code. Use <code class="function">cogl_framebuffer_perspective()</code> instead</p>
</div>
<p>
Replaces the current projection matrix with a perspective matrix
based on the provided values.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>You should be careful not to have to great a <em class="parameter"><code>z_far</code></em> / <em class="parameter"><code>z_near</code></em>
ratio since that will reduce the effectiveness of depth testing
since there wont be enough precision to identify the depth of
objects near to each other.</div>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>fovy</code></em> :</span></p></td>
<td>Vertical field of view angle in degrees.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>aspect</code></em> :</span></p></td>
<td>The (width over height) aspect ratio for display</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>z_near</code></em> :</span></p></td>
<td>The distance to the near clipping plane (Must be positive)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>z_far</code></em> :</span></p></td>
<td>The distance to the far clipping plane (Must be positive)</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-ortho"></a><h3>cogl_ortho ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_ortho (<em class="parameter"><code><span class="type">float</span> left</code></em>,
<em class="parameter"><code><span class="type">float</span> right</code></em>,
<em class="parameter"><code><span class="type">float</span> bottom</code></em>,
<em class="parameter"><code><span class="type">float</span> top</code></em>,
<em class="parameter"><code><span class="type">float</span> near</code></em>,
<em class="parameter"><code><span class="type">float</span> far</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_ortho</code> has been deprecated since version 1.10 and should not be used in newly-written code. Use <code class="function">cogl_framebuffer_orthographic()</code> instead</p>
</div>
<p>
Replaces the current projection matrix with an orthographic projection
matrix. See <a class="xref" href="cogl-General-API.html#cogl-ortho-matrix" title="Figure 1. ">Figure 1, “”</a> to see how the matrix is
calculated.
</p>
<p>
</p>
<div class="figure">
<a name="cogl-ortho-matrix"></a><p class="title"><b>Figure 1. </b></p>
<div class="figure-contents"><div><img src="cogl_ortho.png"></div></div>
</div>
<p><br class="figure-break">
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>This function copies the arguments from OpenGL's <code class="function">glOrtho()</code> even
though they are unnecessarily confusing due to the z near and z far
arguments actually being a "distance" from the origin, where
negative values are behind the viewer, instead of coordinates for
the z clipping planes which would have been consistent with the
left, right bottom and top arguments.</div>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>left</code></em> :</span></p></td>
<td>The coordinate for the left clipping plane</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>right</code></em> :</span></p></td>
<td>The coordinate for the right clipping plane</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>bottom</code></em> :</span></p></td>
<td>The coordinate for the bottom clipping plane</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>top</code></em> :</span></p></td>
<td>The coordinate for the top clipping plane</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>near</code></em> :</span></p></td>
<td>The <span class="emphasis"><em>distance</em></span> to the near clipping
plane (negative if the plane is behind the viewer)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>far</code></em> :</span></p></td>
<td>The <span class="emphasis"><em>distance</em></span> for the far clipping
plane (negative if the plane is behind the viewer)</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-get-modelview-matrix"></a><h3>cogl_get_modelview_matrix ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_get_modelview_matrix (<em class="parameter"><code><a class="link" href="cogl-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *matrix</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_get_modelview_matrix</code> has been deprecated since version 1.10 and should not be used in newly-written code. Use <code class="function">cogl_framebuffer_get_modelview_matrix()</code>
instead</p>
</div>
<p>
Stores the current model-view matrix in <em class="parameter"><code>matrix</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
<td>return location for the model-view matrix. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-set-modelview-matrix"></a><h3>cogl_set_modelview_matrix ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_set_modelview_matrix (<em class="parameter"><code><a class="link" href="cogl-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *matrix</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_set_modelview_matrix</code> has been deprecated since version 1.10 and should not be used in newly-written code. Use <code class="function">cogl_framebuffer_set_modelview_matrix()</code>
instead</p>
</div>
<p>
Loads <em class="parameter"><code>matrix</code></em> as the new model-view matrix.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
<td>the new model-view matrix</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-get-projection-matrix"></a><h3>cogl_get_projection_matrix ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_get_projection_matrix (<em class="parameter"><code><a class="link" href="cogl-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *matrix</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_get_projection_matrix</code> has been deprecated since version 1.10 and should not be used in newly-written code. Use <code class="function">cogl_framebuffer_get_projection_matrix()</code>
instead</p>
</div>
<p>
Stores the current projection matrix in <em class="parameter"><code>matrix</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
<td>return location for the projection matrix. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-set-projection-matrix"></a><h3>cogl_set_projection_matrix ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_set_projection_matrix (<em class="parameter"><code><a class="link" href="cogl-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *matrix</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_set_projection_matrix</code> has been deprecated since version 1.10 and should not be used in newly-written code. Use <code class="function">cogl_framebuffer_set_projection_matrix()</code>
instead</p>
</div>
<p>
Loads matrix as the new projection matrix.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
<td>the new projection matrix</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-set-viewport"></a><h3>cogl_set_viewport ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_set_viewport (<em class="parameter"><code><span class="type">int</span> x</code></em>,
<em class="parameter"><code><span class="type">int</span> y</code></em>,
<em class="parameter"><code><span class="type">int</span> width</code></em>,
<em class="parameter"><code><span class="type">int</span> height</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_set_viewport</code> has been deprecated since version 1.8 and should not be used in newly-written code. Use <code class="function">cogl_framebuffer_set_viewport()</code> instead</p>
</div>
<p>
Replaces the current viewport with the given values.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>X offset of the viewport</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>Y offset of the viewport</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
<td>Width of the viewport</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
<td>Height of the viewport</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.2</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-get-viewport"></a><h3>cogl_get_viewport ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_get_viewport (<em class="parameter"><code><span class="type">float</span> v[4]</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_get_viewport</code> has been deprecated since version 1.10 and should not be used in newly-written code. Use <code class="function">cogl_framebuffer_get_viewport4fv()</code>
instead</p>
</div>
<p>
Stores the current viewport in <em class="parameter"><code>v</code></em>. <em class="parameter"><code>v</code></em>[0] and <em class="parameter"><code>v</code></em>[1] get the x and y
position of the viewport and <em class="parameter"><code>v</code></em>[2] and <em class="parameter"><code>v</code></em>[3] get the width and
height.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>v</code></em> :</span></p></td>
<td>pointer to a 4 element array
of <span class="type">float</span>s to receive the viewport dimensions. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> fixed-size=4]</span>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-clear"></a><h3>cogl_clear ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_clear (<em class="parameter"><code>const <a class="link" href="cogl-Color-Type.html#CoglColor" title="struct CoglColor"><span class="type">CoglColor</span></a> *color</code></em>,
<em class="parameter"><code><span class="type">unsigned long </span> buffers</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_clear</code> has been deprecated since version 1.16 and should not be used in newly-written code. Use <code class="function">cogl_framebuffer_clear()</code> api instead</p>
</div>
<p>
Clears all the auxiliary buffers identified in the <em class="parameter"><code>buffers</code></em> mask, and if
that includes the color buffer then the specified <em class="parameter"><code>color</code></em> is used.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
<td>Background color to clear to</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffers</code></em> :</span></p></td>
<td>A mask of <a class="link" href="cogl-General-API.html#CoglBufferBit" title="enum CoglBufferBit"><span class="type">CoglBufferBit</span></a>'s identifying which auxiliary
buffers to clear</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-set-backface-culling-enabled"></a><h3>cogl_set_backface_culling_enabled ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_set_backface_culling_enabled (<em class="parameter"><code><span class="type">CoglBool</span> setting</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_set_backface_culling_enabled</code> has been deprecated since version 1.16 and should not be used in newly-written code. Use <code class="function">cogl_pipeline_set_cull_face_mode()</code> instead</p>
</div>
<p>
Sets whether textures positioned so that their backface is showing
should be hidden. This can be used to efficiently draw two-sided
textures or fully closed cubes without enabling depth testing. This
only affects calls to the cogl_rectangle* family of functions and
cogl_vertex_buffer_draw*. Backface culling is disabled by default.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>setting</code></em> :</span></p></td>
<td>
<code class="literal">TRUE</code> to enable backface culling or <code class="literal">FALSE</code> to disable.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-get-backface-culling-enabled"></a><h3>cogl_get_backface_culling_enabled ()</h3>
<pre class="programlisting"><span class="returnvalue">CoglBool</span> cogl_get_backface_culling_enabled (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_get_backface_culling_enabled</code> has been deprecated since version 1.16 and should not be used in newly-written code. Use <code class="function">cogl_pipeline_get_cull_face_mode()</code> instead</p>
</div>
<p>
Queries if backface culling has been enabled via
<a class="link" href="cogl-General-API.html#cogl-set-backface-culling-enabled" title="cogl_set_backface_culling_enabled ()"><code class="function">cogl_set_backface_culling_enabled()</code></a>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<code class="literal">TRUE</code> if backface culling is enabled, and <code class="literal">FALSE</code> otherwise</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="CoglFogMode"></a><h3>enum CoglFogMode</h3>
<pre class="programlisting">typedef enum {
COGL_FOG_MODE_LINEAR,
COGL_FOG_MODE_EXPONENTIAL,
COGL_FOG_MODE_EXPONENTIAL_SQUARED
} CoglFogMode;
</pre>
<p>
The fog mode determines the equation used to calculate the fogging blend
factor while fogging is enabled. The simplest <a class="link" href="cogl-General-API.html#COGL-FOG-MODE-LINEAR:CAPS"><code class="literal">COGL_FOG_MODE_LINEAR</code></a> mode
determines f as:
</p>
<p>
</p>
<div class="informalexample"><pre class="programlisting">
f = end - eye_distance / end - start
</pre></div>
<p>
</p>
<p>
Where eye_distance is the distance of the current fragment in eye
coordinates from the origin.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="COGL-FOG-MODE-LINEAR:CAPS"></a><span class="term"><code class="literal">COGL_FOG_MODE_LINEAR</code></span></p></td>
<td>Calculates the fog blend factor as:
<div class="informalexample"><pre class="programlisting">
f = end - eye_distance / end - start
</pre></div>
</td>
</tr>
<tr>
<td><p><a name="COGL-FOG-MODE-EXPONENTIAL:CAPS"></a><span class="term"><code class="literal">COGL_FOG_MODE_EXPONENTIAL</code></span></p></td>
<td>Calculates the fog blend factor as:
<div class="informalexample"><pre class="programlisting">
f = e ^ -(density * eye_distance)
</pre></div>
</td>
</tr>
<tr>
<td><p><a name="COGL-FOG-MODE-EXPONENTIAL-SQUARED:CAPS"></a><span class="term"><code class="literal">COGL_FOG_MODE_EXPONENTIAL_SQUARED</code></span></p></td>
<td>Calculates the fog blend factor as:
<div class="informalexample"><pre class="programlisting">
f = e ^ -(density * eye_distance)^2
</pre></div>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-set-fog"></a><h3>cogl_set_fog ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_set_fog (<em class="parameter"><code>const <a class="link" href="cogl-Color-Type.html#CoglColor" title="struct CoglColor"><span class="type">CoglColor</span></a> *fog_color</code></em>,
<em class="parameter"><code><a class="link" href="cogl-General-API.html#CoglFogMode" title="enum CoglFogMode"><span class="type">CoglFogMode</span></a> mode</code></em>,
<em class="parameter"><code><span class="type">float</span> density</code></em>,
<em class="parameter"><code><span class="type">float</span> z_near</code></em>,
<em class="parameter"><code><span class="type">float</span> z_far</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_set_fog</code> has been deprecated since version 1.16 and should not be used in newly-written code. Use <span class="type">CoglSnippet</span> shader api for fog</p>
</div>
<p>
Enables fogging. Fogging causes vertices that are further away from the eye
to be rendered with a different color. The color is determined according to
the chosen fog mode; at it's simplest the color is linearly interpolated so
that vertices at <em class="parameter"><code>z_near</code></em> are drawn fully with their original color and
vertices at <em class="parameter"><code>z_far</code></em> are drawn fully with <em class="parameter"><code>fog_color</code></em>. Fogging will remain
enabled until you call <a class="link" href="cogl-General-API.html#cogl-disable-fog" title="cogl_disable_fog ()"><code class="function">cogl_disable_fog()</code></a>.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>The fogging functions only work correctly when primitives use
unmultiplied alpha colors. By default Cogl will premultiply textures
and <a class="link" href="cogl-General-API.html#cogl-set-source-color" title="cogl_set_source_color ()"><code class="function">cogl_set_source_color()</code></a> will premultiply colors, so unless you
explicitly load your textures requesting an unmultiplied internal format
and use <a class="link" href="cogl-Materials.html#cogl-material-set-color" title="cogl_material_set_color ()"><code class="function">cogl_material_set_color()</code></a> you can only use fogging with fully
opaque primitives. This might improve in the future when we can depend
on fragment shaders.</div>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>fog_color</code></em> :</span></p></td>
<td>The color of the fog</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-General-API.html#CoglFogMode" title="enum CoglFogMode"><span class="type">CoglFogMode</span></a> that determines the equation used to calculate the
fogging blend factor.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>density</code></em> :</span></p></td>
<td>Used by <a class="link" href="cogl-General-API.html#COGL-FOG-MODE-EXPONENTIAL:CAPS"><code class="literal">COGL_FOG_MODE_EXPONENTIAL</code></a> and by
<a class="link" href="cogl-General-API.html#COGL-FOG-MODE-EXPONENTIAL-SQUARED:CAPS"><code class="literal">COGL_FOG_MODE_EXPONENTIAL_SQUARED</code></a> equations.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>z_near</code></em> :</span></p></td>
<td>Position along Z axis where no fogging should be applied</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>z_far</code></em> :</span></p></td>
<td>Position along Z axis where full fogging should be applied</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-disable-fog"></a><h3>cogl_disable_fog ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_disable_fog (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_disable_fog</code> has been deprecated since version 1.16 and should not be used in newly-written code. Use <span class="type">CoglSnippet</span> shader api for fog</p>
</div>
<p>
This function disables fogging, so primitives drawn afterwards will not be
blended with any previously set fog color.
</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-set-source"></a><h3>cogl_set_source ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_set_source (<em class="parameter"><code><span class="type">void</span> *material</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_set_source</code> has been deprecated since version 1.16 and should not be used in newly-written code. Latest drawing apis all take an explicit
<span class="type">CoglPipeline</span> argument so this stack of
<a class="link" href="cogl-Materials.html#CoglMaterial" title="CoglMaterial"><span class="type">CoglMaterial</span></a>s shouldn't be used.</p>
</div>
<p>
This function changes the material at the top of the source stack.
The material at the top of this stack defines the GPU state used to
process subsequent primitives, such as rectangles drawn with
<a class="link" href="cogl-Primitives.html#cogl-rectangle" title="cogl_rectangle ()"><code class="function">cogl_rectangle()</code></a> or vertices drawn using <a class="link" href="cogl-Vertex-Buffers.html#cogl-vertex-buffer-draw" title="cogl_vertex_buffer_draw ()"><code class="function">cogl_vertex_buffer_draw()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>material</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-Materials.html#CoglMaterial" title="CoglMaterial"><span class="type">CoglMaterial</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-set-source-color"></a><h3>cogl_set_source_color ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_set_source_color (<em class="parameter"><code>const <a class="link" href="cogl-Color-Type.html#CoglColor" title="struct CoglColor"><span class="type">CoglColor</span></a> *color</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_set_source_color</code> has been deprecated since version 1.16 and should not be used in newly-written code. Latest drawing apis all take an explicit
<span class="type">CoglPipeline</span> argument so this stack of
<a class="link" href="cogl-Materials.html#CoglMaterial" title="CoglMaterial"><span class="type">CoglMaterial</span></a>s shouldn't be used.</p>
</div>
<p>
This is a convenience function for creating a solid fill source material
from the given color. This color will be used for any subsequent drawing
operation.
</p>
<p>
The color will be premultiplied by Cogl, so the color should be
non-premultiplied. For example: use (1.0, 0.0, 0.0, 0.5) for
semi-transparent red.
</p>
<p>
See also <a class="link" href="cogl-General-API.html#cogl-set-source-color4ub" title="cogl_set_source_color4ub ()"><code class="function">cogl_set_source_color4ub()</code></a> and <a class="link" href="cogl-General-API.html#cogl-set-source-color4f" title="cogl_set_source_color4f ()"><code class="function">cogl_set_source_color4f()</code></a>
if you already have the color components.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-Color-Type.html#CoglColor" title="struct CoglColor"><span class="type">CoglColor</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-set-source-color4ub"></a><h3>cogl_set_source_color4ub ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_set_source_color4ub (<em class="parameter"><code><span class="type">uint8_t</span> red</code></em>,
<em class="parameter"><code><span class="type">uint8_t</span> green</code></em>,
<em class="parameter"><code><span class="type">uint8_t</span> blue</code></em>,
<em class="parameter"><code><span class="type">uint8_t</span> alpha</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_set_source_color4ub</code> has been deprecated since version 1.16 and should not be used in newly-written code. Latest drawing apis all take an explicit
<span class="type">CoglPipeline</span> argument so this stack of
<a class="link" href="cogl-Materials.html#CoglMaterial" title="CoglMaterial"><span class="type">CoglMaterial</span></a>s shouldn't be used.</p>
</div>
<p>
This is a convenience function for creating a solid fill source material
from the given color using unsigned bytes for each component. This
color will be used for any subsequent drawing operation.
</p>
<p>
The value for each component is an unsigned byte in the range
between 0 and 255.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>red</code></em> :</span></p></td>
<td>value of the red channel, between 0 and 255</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>green</code></em> :</span></p></td>
<td>value of the green channel, between 0 and 255</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>blue</code></em> :</span></p></td>
<td>value of the blue channel, between 0 and 255</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>alpha</code></em> :</span></p></td>
<td>value of the alpha channel, between 0 and 255</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-set-source-color4f"></a><h3>cogl_set_source_color4f ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_set_source_color4f (<em class="parameter"><code><span class="type">float</span> red</code></em>,
<em class="parameter"><code><span class="type">float</span> green</code></em>,
<em class="parameter"><code><span class="type">float</span> blue</code></em>,
<em class="parameter"><code><span class="type">float</span> alpha</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_set_source_color4f</code> has been deprecated since version 1.16 and should not be used in newly-written code. Latest drawing apis all take an explicit
<span class="type">CoglPipeline</span> argument so this stack of
<a class="link" href="cogl-Materials.html#CoglMaterial" title="CoglMaterial"><span class="type">CoglMaterial</span></a>s shouldn't be used.</p>
</div>
<p>
This is a convenience function for creating a solid fill source material
from the given color using normalized values for each component. This color
will be used for any subsequent drawing operation.
</p>
<p>
The value for each component is a fixed point number in the range
between 0 and <code class="literal">1</code>.0. If the values passed in are outside that
range, they will be clamped.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>red</code></em> :</span></p></td>
<td>value of the red channel, between 0 and <code class="literal">1</code>.0</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>green</code></em> :</span></p></td>
<td>value of the green channel, between 0 and <code class="literal">1</code>.0</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>blue</code></em> :</span></p></td>
<td>value of the blue channel, between 0 and <code class="literal">1</code>.0</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>alpha</code></em> :</span></p></td>
<td>value of the alpha channel, between 0 and <code class="literal">1</code>.0</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-set-source-texture"></a><h3>cogl_set_source_texture ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_set_source_texture (<em class="parameter"><code><span class="type">CoglTexture</span> *texture</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_set_source_texture</code> has been deprecated since version 1.16 and should not be used in newly-written code. Latest drawing apis all take an explicit
<span class="type">CoglPipeline</span> argument so this stack of
<a class="link" href="cogl-Materials.html#CoglMaterial" title="CoglMaterial"><span class="type">CoglMaterial</span></a>s shouldn't be used.</p>
</div>
<p>
This is a convenience function for creating a material with the first
layer set to <em class="parameter"><code>texture</code></em> and setting that material as the source with
cogl_set_source.
</p>
<p>
Note: There is no interaction between calls to cogl_set_source_color
and cogl_set_source_texture. If you need to blend a texture with a color then
you can create a simple material like this:
</p>
<pre class="programlisting">
material = cogl_material_new ();
cogl_material_set_color4ub (material, 0xff, 0x00, 0x00, 0x80);
cogl_material_set_layer (material, 0, tex_handle);
cogl_set_source (material);
</pre>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>texture</code></em> :</span></p></td>
<td>The <span class="type">CoglTexture</span> you want as your source</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-get-source"></a><h3>cogl_get_source ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> * cogl_get_source (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_get_source</code> has been deprecated since version 1.16 and should not be used in newly-written code. Latest drawing apis all take an explicit
<span class="type">CoglPipeline</span> argument so this stack of
<a class="link" href="cogl-Materials.html#CoglMaterial" title="CoglMaterial"><span class="type">CoglMaterial</span></a>s shouldn't be used.</p>
</div>
<p>
Returns the current source material as previously set using
<a class="link" href="cogl-General-API.html#cogl-set-source" title="cogl_set_source ()"><code class="function">cogl_set_source()</code></a>.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>You should typically consider the returned material immutable
and not try to change any of its properties unless you own a
reference to that material. At times you may be able to get a
reference to an internally managed materials and the result of
modifying such materials is undefined.</div>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The current source material.</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.6</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-push-source"></a><h3>cogl_push_source ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_push_source (<em class="parameter"><code><span class="type">void</span> *material</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_push_source</code> has been deprecated since version 1.16 and should not be used in newly-written code. Latest drawing apis all take an explicit
<span class="type">CoglPipeline</span> argument so this stack of
<a class="link" href="cogl-Materials.html#CoglMaterial" title="CoglMaterial"><span class="type">CoglMaterial</span></a>s shouldn't be used.</p>
</div>
<p>
Pushes the given <em class="parameter"><code>material</code></em> to the top of the source stack. The
material at the top of this stack defines the GPU state used to
process later primitives as defined by <a class="link" href="cogl-General-API.html#cogl-set-source" title="cogl_set_source ()"><code class="function">cogl_set_source()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>material</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-Materials.html#CoglMaterial" title="CoglMaterial"><span class="type">CoglMaterial</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.6</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-pop-source"></a><h3>cogl_pop_source ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_pop_source (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_pop_source</code> has been deprecated since version 1.16 and should not be used in newly-written code. Latest drawing apis all take an explicit
<span class="type">CoglPipeline</span> argument so this stack of
<a class="link" href="cogl-Materials.html#CoglMaterial" title="CoglMaterial"><span class="type">CoglMaterial</span></a>s shouldn't be used.</p>
</div>
<p>
Removes the material at the top of the source stack. The material
at the top of this stack defines the GPU state used to process
later primitives as defined by <a class="link" href="cogl-General-API.html#cogl-set-source" title="cogl_set_source ()"><code class="function">cogl_set_source()</code></a>.
</p>
<p class="since">Since 1.6</p>
</div>
<hr>
<div class="refsect2">
<a name="CoglReadPixelsFlags"></a><h3>enum CoglReadPixelsFlags</h3>
<pre class="programlisting">typedef enum {
/*< prefix=COGL_READ_PIXELS >*/
COGL_READ_PIXELS_COLOR_BUFFER = 1L << 0
} CoglReadPixelsFlags;
</pre>
<p>
Flags for <code class="function">cogl_framebuffer_read_pixels_into_bitmap()</code>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><a name="COGL-READ-PIXELS-COLOR-BUFFER:CAPS"></a><span class="term"><code class="literal">COGL_READ_PIXELS_COLOR_BUFFER</code></span></p></td>
<td>Read from the color buffer
</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-read-pixels"></a><h3>cogl_read_pixels ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_read_pixels (<em class="parameter"><code><span class="type">int</span> x</code></em>,
<em class="parameter"><code><span class="type">int</span> y</code></em>,
<em class="parameter"><code><span class="type">int</span> width</code></em>,
<em class="parameter"><code><span class="type">int</span> height</code></em>,
<em class="parameter"><code><a class="link" href="cogl-General-API.html#CoglReadPixelsFlags" title="enum CoglReadPixelsFlags"><span class="type">CoglReadPixelsFlags</span></a> source</code></em>,
<em class="parameter"><code><a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="type">CoglPixelFormat</span></a> format</code></em>,
<em class="parameter"><code><span class="type">uint8_t</span> *pixels</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_read_pixels</code> has been deprecated since version 1.16 and should not be used in newly-written code. Use <code class="function">cogl_framebuffer_read_pixels()</code> instead</p>
</div>
<p>
This reads a rectangle of pixels from the current framebuffer where
position (0, 0) is the top left. The pixel at (x, y) is the first
read, and the data is returned with a rowstride of (width * 4).
</p>
<p>
Currently Cogl assumes that the framebuffer is in a premultiplied
format so if <em class="parameter"><code>format</code></em> is non-premultiplied it will convert it. To
read the pixel values without any conversion you should either
specify a format that doesn't use an alpha channel or use one of
the formats ending in PRE.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>The window x position to start reading from</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>The window y position to start reading from</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
<td>The width of the rectangle you want to read</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
<td>The height of the rectangle you want to read</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
<td>Identifies which auxillary buffer you want to read
(only COGL_READ_PIXELS_COLOR_BUFFER supported currently)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
<td>The pixel format you want the result in
(only COGL_PIXEL_FORMAT_RGBA_8888 supported currently)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pixels</code></em> :</span></p></td>
<td>The location to write the pixel data.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-flush"></a><h3>cogl_flush ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_flush (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
This function should only need to be called in exceptional circumstances.
</p>
<p>
As an optimization Cogl drawing functions may batch up primitives
internally, so if you are trying to use raw GL outside of Cogl you stand a
better chance of being successful if you ask Cogl to flush any batched
geometry before making your state changes.
</p>
<p>
It only ensure that the underlying driver is issued all the commands
necessary to draw the batched primitives. It provides no guarantees about
when the driver will complete the rendering.
</p>
<p>
This provides no guarantees about the GL state upon returning and to avoid
confusing Cogl you should aim to restore any changes you make before
resuming use of Cogl.
</p>
<p>
If you are making state changes with the intention of affecting Cogl drawing
primitives you are 100% on your own since you stand a good chance of
conflicting with Cogl internals. For example clutter-gst which currently
uses direct GL calls to bind ARBfp programs will very likely break when Cogl
starts to use ARBfb programs itself for the material API.
</p>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-begin-gl"></a><h3>cogl_begin_gl ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_begin_gl (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_begin_gl</code> has been deprecated since version 1.16 and should not be used in newly-written code. Use the <span class="type">CoglGLES2Context</span> api instead</p>
</div>
<p>
We do not advise nor reliably support the interleaving of raw GL drawing and
Cogl drawing functions, but if you insist, <a class="link" href="cogl-General-API.html#cogl-begin-gl" title="cogl_begin_gl ()"><code class="function">cogl_begin_gl()</code></a> and <a class="link" href="cogl-General-API.html#cogl-end-gl" title="cogl_end_gl ()"><code class="function">cogl_end_gl()</code></a>
provide a simple mechanism that may at least give you a fighting chance of
succeeding.
</p>
<p>
Note: this doesn't help you modify the behaviour of Cogl drawing functions
through the modification of GL state; that will never be reliably supported,
but if you are trying to do something like:
</p>
<p>
</p>
<div class="informalexample"><pre class="programlisting">
{
- setup some OpenGL state.
- draw using OpenGL (e.g. glDrawArrays() )
- reset modified OpenGL state.
- continue using Cogl to draw
}
</pre></div>
<p>
</p>
<p>
You should surround blocks of drawing using raw GL with <a class="link" href="cogl-General-API.html#cogl-begin-gl" title="cogl_begin_gl ()"><code class="function">cogl_begin_gl()</code></a>
and <a class="link" href="cogl-General-API.html#cogl-end-gl" title="cogl_end_gl ()"><code class="function">cogl_end_gl()</code></a>:
</p>
<p>
</p>
<div class="informalexample"><pre class="programlisting">
{
cogl_begin_gl ();
- setup some OpenGL state.
- draw using OpenGL (e.g. glDrawArrays() )
- reset modified OpenGL state.
cogl_end_gl ();
- continue using Cogl to draw
}
</pre></div>
<p>
</p>
<p>
Don't ever try and do:
</p>
<p>
</p>
<div class="informalexample"><pre class="programlisting">
{
- setup some OpenGL state.
- use Cogl to draw
- reset modified OpenGL state.
}
</pre></div>
<p>
</p>
<p>
When the internals of Cogl evolves, this is very liable to break.
</p>
<p>
This function will flush all batched primitives, and subsequently flush
all internal Cogl state to OpenGL as if it were going to draw something
itself.
</p>
<p>
The result is that the OpenGL modelview matrix will be setup; the state
corresponding to the current source material will be set up and other world
state such as backface culling, depth and fogging enabledness will be sent
to OpenGL.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>No special material state is flushed, so if you want Cogl to setup a
simplified material state it is your responsibility to set a simple source
material before calling <a class="link" href="cogl-General-API.html#cogl-begin-gl" title="cogl_begin_gl ()"><code class="function">cogl_begin_gl()</code></a>. E.g. by calling
<a class="link" href="cogl-General-API.html#cogl-set-source-color4ub" title="cogl_set_source_color4ub ()"><code class="function">cogl_set_source_color4ub()</code></a>.</div>
<p>
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>It is your responsibility to restore any OpenGL state that you modify
to how it was after calling <a class="link" href="cogl-General-API.html#cogl-begin-gl" title="cogl_begin_gl ()"><code class="function">cogl_begin_gl()</code></a> if you don't do this then the
result of further Cogl calls is undefined.</div>
<p>
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>You can not nest begin/end blocks.</div>
<p>
</p>
<p>
Again we would like to stress, we do not advise the use of this API and if
possible we would prefer to improve Cogl than have developers require raw
OpenGL.
</p>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-end-gl"></a><h3>cogl_end_gl ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> cogl_end_gl (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_end_gl</code> has been deprecated since version 1.16 and should not be used in newly-written code. Use the <span class="type">CoglGLES2Context</span> api instead</p>
</div>
<p>
This is the counterpart to <a class="link" href="cogl-General-API.html#cogl-begin-gl" title="cogl_begin_gl ()"><code class="function">cogl_begin_gl()</code></a> used to delimit blocks of drawing
code using raw OpenGL. Please refer to <a class="link" href="cogl-General-API.html#cogl-begin-gl" title="cogl_begin_gl ()"><code class="function">cogl_begin_gl()</code></a> for full details.
</p>
<p class="since">Since 1.0</p>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.19</div>
</body>
</html>
|