15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci SGIS_line_texgen 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_SGIS_line_texgen 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciVersion 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci $Date: 1999/04/03 08:40:53 $ $Revision: 1.3 $ 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciNumber 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci ?? 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ciDependencies 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ciOverview 205bd8deadSopenharmony_ci 215bd8deadSopenharmony_ci This extension adds two texture coordinate generation modes, both 225bd8deadSopenharmony_ci which generate a texture coordinate based on the minimum distance 235bd8deadSopenharmony_ci from a vertex to a specified line. 245bd8deadSopenharmony_ci 255bd8deadSopenharmony_ciNew Procedures and Functions 265bd8deadSopenharmony_ci 275bd8deadSopenharmony_ci None 285bd8deadSopenharmony_ci 295bd8deadSopenharmony_ciNew Tokens 305bd8deadSopenharmony_ci 315bd8deadSopenharmony_ci Accepted by the <params> parameters of TexGeni, TexGenf, TexGend, 325bd8deadSopenharmony_ci TexGeniv, TexGenfv, and TexGendv: 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ci EYE_DISTANCE_TO_LINE_SGIS 355bd8deadSopenharmony_ci OBJECT_DISTANCE_TO_LINE_SGIS 365bd8deadSopenharmony_ci 375bd8deadSopenharmony_ci Accepted by the <pname> parameters of TexGeniv, TexGenfv, and TexGendv: 385bd8deadSopenharmony_ci 395bd8deadSopenharmony_ci EYE_LINE_SGIS 405bd8deadSopenharmony_ci OBJECT_LINE_SGIS 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.0 Specification (OpenGL Operation) 435bd8deadSopenharmony_ci 445bd8deadSopenharmony_ci If TEXTURE_GEN_MODE indicates OBJECT_DISTANCE_TO_LINE_SGIS, then the 455bd8deadSopenharmony_ci generating function for the coordinate indicated by <coord> is 465bd8deadSopenharmony_ci 475bd8deadSopenharmony_ci g = || O - (O (dot) D') * D' || 485bd8deadSopenharmony_ci 495bd8deadSopenharmony_ci where 505bd8deadSopenharmony_ci 515bd8deadSopenharmony_ci P is a point (px/pw, py/pw, pz/pw) 525bd8deadSopenharmony_ci 535bd8deadSopenharmony_ci D is a vector (dx, dy, dz) 545bd8deadSopenharmony_ci 555bd8deadSopenharmony_ci D' is the normalized form of D 565bd8deadSopenharmony_ci 575bd8deadSopenharmony_ci V' is (xo/wo, yo/wo, zo/wo) 585bd8deadSopenharmony_ci 595bd8deadSopenharmony_ci O = V' - P 605bd8deadSopenharmony_ci 615bd8deadSopenharmony_ci In other words, g is the distance in object coordinates from the 625bd8deadSopenharmony_ci vertex to the line defined by point P and direction D. 635bd8deadSopenharmony_ci 645bd8deadSopenharmony_ci xo, yo, zo, and wo are the object coordinates of the vertex. 655bd8deadSopenharmony_ci 665bd8deadSopenharmony_ci P and D are specified together by calling TexGen with <pname> set 675bd8deadSopenharmony_ci to OBJECT_LINE and <params> pointing to an array containing px, py, 685bd8deadSopenharmony_ci pz, pw, dx, dy, and dz, respectively. 695bd8deadSopenharmony_ci 705bd8deadSopenharmony_ci If TEXTURE_GEN_MODE indicates EYE_DISTANCE_TO_LINE_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 D is a direction vector (dx', dy', dz') where 825bd8deadSopenharmony_ci 835bd8deadSopenharmony_ci -1 845bd8deadSopenharmony_ci (dx', dy', dz') = (dx, dy, dz) M 855bd8deadSopenharmony_ci u 865bd8deadSopenharmony_ci 875bd8deadSopenharmony_ci and M is the upper leftmost 3x3 matrix taken from the 885bd8deadSopenharmony_ci u 895bd8deadSopenharmony_ci modelview matrix. 905bd8deadSopenharmony_ci 915bd8deadSopenharmony_ci V' is (xe/we, ye/we, ze/we) 925bd8deadSopenharmony_ci 935bd8deadSopenharmony_ci In other words, g is the distance in eye coordinates from the 945bd8deadSopenharmony_ci vertex to the line defined by point P and direction D. 955bd8deadSopenharmony_ci 965bd8deadSopenharmony_ci xe, ye, ze, and we are the eye coordinates of the vertex. 975bd8deadSopenharmony_ci 985bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.0 Specification (Rasterization) 995bd8deadSopenharmony_ci 1005bd8deadSopenharmony_ci None 1015bd8deadSopenharmony_ci 1025bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations 1035bd8deadSopenharmony_ciand the Frame Buffer) 1045bd8deadSopenharmony_ci 1055bd8deadSopenharmony_ci None 1065bd8deadSopenharmony_ci 1075bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.0 Specification (Special Functions) 1085bd8deadSopenharmony_ci 1095bd8deadSopenharmony_ci None 1105bd8deadSopenharmony_ci 1115bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.0 Specification (State and State Requests) 1125bd8deadSopenharmony_ci 1135bd8deadSopenharmony_ci None 1145bd8deadSopenharmony_ci 1155bd8deadSopenharmony_ciNew State 1165bd8deadSopenharmony_ci Initial 1175bd8deadSopenharmony_ci Get Value Get Command Type Value Attrib 1185bd8deadSopenharmony_ci --------- ----------- ---- ------- ------ 1195bd8deadSopenharmony_ci EYE_LINE_SGIS GetTexGeniv 7 x R {0,0,0,1,0,0,1} texture 1205bd8deadSopenharmony_ci OBJECT_LINE_SGIS GetTexGeniv 7 x R {0,0,0,1,0,0,1} texture 1215bd8deadSopenharmony_ci 1225bd8deadSopenharmony_ci 123