• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    SGIS_line_texgen
4
5Name Strings
6
7    GL_SGIS_line_texgen
8
9Version
10
11    $Date: 1999/04/03 08:40:53 $ $Revision: 1.3 $
12
13Number
14
15    ??
16
17Dependencies
18
19Overview
20
21    This extension adds two texture coordinate generation modes, both
22    which generate a texture coordinate based on the minimum distance
23    from a vertex to a specified line.
24
25New Procedures and Functions
26
27    None
28
29New Tokens
30
31    Accepted by the <params> parameters of TexGeni, TexGenf, TexGend,
32    TexGeniv, TexGenfv, and TexGendv:
33
34	EYE_DISTANCE_TO_LINE_SGIS
35	OBJECT_DISTANCE_TO_LINE_SGIS
36
37    Accepted by the <pname> parameters of TexGeniv, TexGenfv, and TexGendv:
38
39	EYE_LINE_SGIS
40	OBJECT_LINE_SGIS
41
42Additions to Chapter 2 of the 1.0 Specification (OpenGL Operation)
43
44    If TEXTURE_GEN_MODE indicates OBJECT_DISTANCE_TO_LINE_SGIS, then the
45    generating function for the coordinate indicated by <coord> is
46
47	g = || O - (O (dot) D') * D' ||
48
49    where
50
51	P is a point (px/pw, py/pw, pz/pw)
52
53        D is a vector (dx, dy, dz)
54
55	D' is the normalized form of D
56
57        V' is (xo/wo, yo/wo, zo/wo)
58
59	O = V' - P
60
61    In other words, g is the distance in object coordinates from the
62    vertex to the line defined by point P and direction D.
63
64    xo, yo, zo, and wo are the object coordinates of the vertex.
65
66    P and D are specified together by calling TexGen with <pname> set
67    to OBJECT_LINE and <params> pointing to an array containing px, py,
68    pz, pw, dx, dy, and dz, respectively.
69
70    If TEXTURE_GEN_MODE indicates EYE_DISTANCE_TO_LINE_SGIS, then the
71    generating function for the coordinate indicated by <coord> is the
72    same as above, but P, D, and V' are redefined as:
73
74	P is a point (px'/pw', py'/pw', pz'/pw') where
75
76					 |px|
77					 |py|
78		(px', py', pz', pw') = M |pz|
79					 |pw|
80
81	D is a direction vector (dx', dy', dz') where
82
83						-1
84		(dx', dy', dz') = (dx, dy, dz) M
85						u
86
87		and M  is the upper leftmost 3x3 matrix taken from the
88		     u
89		modelview matrix.
90
91	V' is (xe/we, ye/we, ze/we)
92
93    In other words, g is the distance in eye coordinates from the
94    vertex to the line defined by point P and direction D.
95
96    xe, ye, ze, and we are the eye coordinates of the vertex.
97
98Additions to Chapter 3 of the 1.0 Specification (Rasterization)
99
100    None
101
102Additions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations
103and the Frame Buffer)
104
105    None
106
107Additions to Chapter 5 of the 1.0 Specification (Special Functions)
108
109    None
110
111Additions to Chapter 6 of the 1.0 Specification (State and State Requests)
112
113    None
114
115New State
116							Initial
117    Get Value			Get Command	Type	Value			Attrib
118    ---------			-----------	----	-------			------
119    EYE_LINE_SGIS		GetTexGeniv	7 x R	{0,0,0,1,0,0,1}		texture
120    OBJECT_LINE_SGIS		GetTexGeniv	7 x R	{0,0,0,1,0,0,1}		texture
121
122
123