15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci SGIS_point_line_texgen 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_SGIS_point_line_texgen 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciVersion 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Last Modified Date: April 3, 1999 125bd8deadSopenharmony_ci Author Revision: $Header: //depot/main/doc/registry/extensions/SGI/point_line_texgen.spec#4 $ 135bd8deadSopenharmony_ci 145bd8deadSopenharmony_ciNumber 155bd8deadSopenharmony_ci 165bd8deadSopenharmony_ci 213 175bd8deadSopenharmony_ci 185bd8deadSopenharmony_ciDependencies 195bd8deadSopenharmony_ci 205bd8deadSopenharmony_ci OpenGL 1.1 is required. 215bd8deadSopenharmony_ci 225bd8deadSopenharmony_ciOverview 235bd8deadSopenharmony_ci 245bd8deadSopenharmony_ci This extension adds two texture coordinate generation modes, both 255bd8deadSopenharmony_ci which generate a texture coordinate based on the minimum distance 265bd8deadSopenharmony_ci from a vertex to a specified line. 275bd8deadSopenharmony_ci 285bd8deadSopenharmony_ciNew Procedures and Functions 295bd8deadSopenharmony_ci 305bd8deadSopenharmony_ci None 315bd8deadSopenharmony_ci 325bd8deadSopenharmony_ciNew Tokens 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ci Accepted by the <params> parameters of TexGeni, TexGenf, TexGend, 355bd8deadSopenharmony_ci TexGeniv, TexGenfv, and TexGendv: 365bd8deadSopenharmony_ci 375bd8deadSopenharmony_ci EYE_DISTANCE_TO_POINT_SGIS 0x81F0 385bd8deadSopenharmony_ci OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1 395bd8deadSopenharmony_ci EYE_DISTANCE_TO_LINE_SGIS 0x81F2 405bd8deadSopenharmony_ci OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ci Accepted by the <pname> parameters of TexGeniv, TexGenfv, and TexGendv: 435bd8deadSopenharmony_ci 445bd8deadSopenharmony_ci EYE_POINT_SGIS 0x81F4 455bd8deadSopenharmony_ci OBJECT_POINT_SGIS 0x81F5 465bd8deadSopenharmony_ci EYE_LINE_SGIS 0x81F6 475bd8deadSopenharmony_ci OBJECT_LINE_SGIS 0x81F7 485bd8deadSopenharmony_ci 495bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.0 Specification (OpenGL Operation) 505bd8deadSopenharmony_ci 515bd8deadSopenharmony_ci If TEXTURE_GEN_MODE indicates OBJECT_DISTANCE_TO_POINT_SGIS, then the 525bd8deadSopenharmony_ci generating function for the coordinate indicated by <coord> is 535bd8deadSopenharmony_ci 545bd8deadSopenharmony_ci g = || V' - P || 555bd8deadSopenharmony_ci 565bd8deadSopenharmony_ci where 575bd8deadSopenharmony_ci 585bd8deadSopenharmony_ci P is a point (px/pw, py/pw, pz/pw) 595bd8deadSopenharmony_ci 605bd8deadSopenharmony_ci V' is (xo/wo, yo/wo, zo/wo) 615bd8deadSopenharmony_ci 625bd8deadSopenharmony_ci In other words, g is the distance in object coordinates from the 635bd8deadSopenharmony_ci vertex to P. 645bd8deadSopenharmony_ci 655bd8deadSopenharmony_ci xo, yo, zo, and wo are the object coordinates of the vertex. 665bd8deadSopenharmony_ci 675bd8deadSopenharmony_ci P is specified by calling TexGen with <pname> set to OBJECT_POINT and 685bd8deadSopenharmony_ci <params> pointing to an array containing px, py, pz, and pw, respectively. 695bd8deadSopenharmony_ci 705bd8deadSopenharmony_ci If TEXTURE_GEN_MODE indicates EYE_DISTANCE_TO_POINT_SGIS, then the 715bd8deadSopenharmony_ci generating function for the coordinate indicated by <coord> is the 725bd8deadSopenharmony_ci same as above, but P, D, and V' are redefined as: 735bd8deadSopenharmony_ci 745bd8deadSopenharmony_ci P is a point (px'/pw', py'/pw', pz'/pw') where 755bd8deadSopenharmony_ci 765bd8deadSopenharmony_ci |px| 775bd8deadSopenharmony_ci |py| 785bd8deadSopenharmony_ci (px', py', pz', pw') = M |pz| 795bd8deadSopenharmony_ci |pw| 805bd8deadSopenharmony_ci 815bd8deadSopenharmony_ci V' is (xe/we, ye/we, ze/we) 825bd8deadSopenharmony_ci 835bd8deadSopenharmony_ci In other words, g is the distance in eye coordinates from the 845bd8deadSopenharmony_ci vertex to P. 855bd8deadSopenharmony_ci 865bd8deadSopenharmony_ci xe, ye, ze, and we are the eye coordinates of the vertex. 875bd8deadSopenharmony_ci 885bd8deadSopenharmony_ci P is specified by calling TexGen with <pname> set to EYE_POINT and 895bd8deadSopenharmony_ci <params> pointing to an array containing px, py, pz, and pw, respectively. 905bd8deadSopenharmony_ci 915bd8deadSopenharmony_ci 925bd8deadSopenharmony_ci If TEXTURE_GEN_MODE indicates OBJECT_DISTANCE_TO_LINE_SGIS, then the 935bd8deadSopenharmony_ci generating function for the coordinate indicated by <coord> is 945bd8deadSopenharmony_ci 955bd8deadSopenharmony_ci g = || O - (O (dot) D') * D' || 965bd8deadSopenharmony_ci 975bd8deadSopenharmony_ci where 985bd8deadSopenharmony_ci 995bd8deadSopenharmony_ci P is a point (px/pw, py/pw, pz/pw) 1005bd8deadSopenharmony_ci 1015bd8deadSopenharmony_ci D is a vector (dx, dy, dz) 1025bd8deadSopenharmony_ci 1035bd8deadSopenharmony_ci D' is the normalized form of D 1045bd8deadSopenharmony_ci 1055bd8deadSopenharmony_ci V' is (xo/wo, yo/wo, zo/wo) 1065bd8deadSopenharmony_ci 1075bd8deadSopenharmony_ci O = V' - P 1085bd8deadSopenharmony_ci 1095bd8deadSopenharmony_ci In other words, g is the distance in object coordinates from the 1105bd8deadSopenharmony_ci vertex to the line defined by point P and direction D. 1115bd8deadSopenharmony_ci 1125bd8deadSopenharmony_ci xo, yo, zo, and wo are the object coordinates of the vertex. 1135bd8deadSopenharmony_ci 1145bd8deadSopenharmony_ci P and D are specified together by calling TexGen with <pname> set 1155bd8deadSopenharmony_ci to OBJECT_LINE and <params> pointing to an array containing px, py, 1165bd8deadSopenharmony_ci pz, pw, dx, dy, and dz, respectively. 1175bd8deadSopenharmony_ci 1185bd8deadSopenharmony_ci If TEXTURE_GEN_MODE indicates EYE_DISTANCE_TO_LINE_SGIS, then the 1195bd8deadSopenharmony_ci generating function for the coordinate indicated by <coord> is the 1205bd8deadSopenharmony_ci same as above, but P, D, and V' are redefined as: 1215bd8deadSopenharmony_ci 1225bd8deadSopenharmony_ci P is a point (px'/pw', py'/pw', pz'/pw') where 1235bd8deadSopenharmony_ci 1245bd8deadSopenharmony_ci |px| 1255bd8deadSopenharmony_ci |py| 1265bd8deadSopenharmony_ci (px', py', pz', pw') = M |pz| 1275bd8deadSopenharmony_ci |pw| 1285bd8deadSopenharmony_ci 1295bd8deadSopenharmony_ci D is a direction vector (dx', dy', dz') where 1305bd8deadSopenharmony_ci 1315bd8deadSopenharmony_ci -1 1325bd8deadSopenharmony_ci (dx', dy', dz') = (dx, dy, dz) M 1335bd8deadSopenharmony_ci u 1345bd8deadSopenharmony_ci 1355bd8deadSopenharmony_ci and M is the upper leftmost 3x3 matrix taken from the 1365bd8deadSopenharmony_ci u 1375bd8deadSopenharmony_ci modelview matrix. 1385bd8deadSopenharmony_ci 1395bd8deadSopenharmony_ci V' is (xe/we, ye/we, ze/we) 1405bd8deadSopenharmony_ci 1415bd8deadSopenharmony_ci In other words, g is the distance in eye coordinates from the 1425bd8deadSopenharmony_ci vertex to the line defined by point P and direction D. 1435bd8deadSopenharmony_ci 1445bd8deadSopenharmony_ci xe, ye, ze, and we are the eye coordinates of the vertex. 1455bd8deadSopenharmony_ci 1465bd8deadSopenharmony_ci P and D are specified together by calling TexGen with <pname> set 1475bd8deadSopenharmony_ci to EYE_LINE and <params> pointing to an array containing px, py, 1485bd8deadSopenharmony_ci pz, pw, dx, dy, and dz, respectively. 1495bd8deadSopenharmony_ci 1505bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.0 Specification (Rasterization) 1515bd8deadSopenharmony_ci 1525bd8deadSopenharmony_ci None 1535bd8deadSopenharmony_ci 1545bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations 1555bd8deadSopenharmony_ciand the Frame Buffer) 1565bd8deadSopenharmony_ci 1575bd8deadSopenharmony_ci None 1585bd8deadSopenharmony_ci 1595bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.0 Specification (Special Functions) 1605bd8deadSopenharmony_ci 1615bd8deadSopenharmony_ci None 1625bd8deadSopenharmony_ci 1635bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.0 Specification (State and State Requests) 1645bd8deadSopenharmony_ci 1655bd8deadSopenharmony_ci None 1665bd8deadSopenharmony_ci 1675bd8deadSopenharmony_ciNew State 1685bd8deadSopenharmony_ci Initial 1695bd8deadSopenharmony_ci Get Value Get Command Type Value Attrib 1705bd8deadSopenharmony_ci --------- ----------- ---- ------- ------ 1715bd8deadSopenharmony_ci EYE_POINT_SGIS GetTexGeniv 4 x R {0,0,0,1} texture 1725bd8deadSopenharmony_ci OBJECT_POINT_SGIS GetTexGeniv 4 x R {0,0,0,1} texture 1735bd8deadSopenharmony_ci EYE_LINE_SGIS GetTexGeniv 7 x R {0,0,0,1,0,0,1} texture 1745bd8deadSopenharmony_ci OBJECT_LINE_SGIS GetTexGeniv 7 x R {0,0,0,1,0,0,1} texture 1755bd8deadSopenharmony_ci 1765bd8deadSopenharmony_ci 177