• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    SGIS_point_line_texgen
4
5Name Strings
6
7    GL_SGIS_point_line_texgen
8
9Version
10
11    Last Modified Date: April 3, 1999
12    Author Revision: $Header: //depot/main/doc/registry/extensions/SGI/point_line_texgen.spec#4 $
13
14Number
15
16    213
17
18Dependencies
19
20    OpenGL 1.1 is required.
21
22Overview
23
24    This extension adds two texture coordinate generation modes, both
25    which generate a texture coordinate based on the minimum distance
26    from a vertex to a specified line.
27
28New Procedures and Functions
29
30    None
31
32New Tokens
33
34    Accepted by the <params> parameters of TexGeni, TexGenf, TexGend,
35    TexGeniv, TexGenfv, and TexGendv:
36
37	EYE_DISTANCE_TO_POINT_SGIS	0x81F0
38	OBJECT_DISTANCE_TO_POINT_SGIS	0x81F1
39	EYE_DISTANCE_TO_LINE_SGIS	0x81F2
40	OBJECT_DISTANCE_TO_LINE_SGIS	0x81F3
41
42    Accepted by the <pname> parameters of TexGeniv, TexGenfv, and TexGendv:
43
44	EYE_POINT_SGIS			0x81F4
45	OBJECT_POINT_SGIS		0x81F5
46	EYE_LINE_SGIS			0x81F6
47	OBJECT_LINE_SGIS		0x81F7
48
49Additions to Chapter 2 of the 1.0 Specification (OpenGL Operation)
50
51    If TEXTURE_GEN_MODE indicates OBJECT_DISTANCE_TO_POINT_SGIS, then the
52    generating function for the coordinate indicated by <coord> is
53
54	g = || V' - P ||
55
56    where
57
58	P is a point (px/pw, py/pw, pz/pw)
59
60        V' is (xo/wo, yo/wo, zo/wo)
61
62    In other words, g is the distance in object coordinates from the
63    vertex to P.
64
65    xo, yo, zo, and wo are the object coordinates of the vertex.
66
67    P is specified by calling TexGen with <pname> set to OBJECT_POINT and
68    <params> pointing to an array containing px, py, pz, and pw, respectively.
69
70    If TEXTURE_GEN_MODE indicates EYE_DISTANCE_TO_POINT_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	V' is (xe/we, ye/we, ze/we)
82
83    In other words, g is the distance in eye coordinates from the
84    vertex to P.
85
86    xe, ye, ze, and we are the eye coordinates of the vertex.
87
88    P is specified by calling TexGen with <pname> set to EYE_POINT and
89    <params> pointing to an array containing px, py, pz, and pw, respectively.
90
91
92    If TEXTURE_GEN_MODE indicates OBJECT_DISTANCE_TO_LINE_SGIS, then the
93    generating function for the coordinate indicated by <coord> is
94
95	g = || O - (O (dot) D') * D' ||
96
97    where
98
99	P is a point (px/pw, py/pw, pz/pw)
100
101        D is a vector (dx, dy, dz)
102
103	D' is the normalized form of D
104
105        V' is (xo/wo, yo/wo, zo/wo)
106
107	O = V' - P
108
109    In other words, g is the distance in object coordinates from the
110    vertex to the line defined by point P and direction D.
111
112    xo, yo, zo, and wo are the object coordinates of the vertex.
113
114    P and D are specified together by calling TexGen with <pname> set
115    to OBJECT_LINE and <params> pointing to an array containing px, py,
116    pz, pw, dx, dy, and dz, respectively.
117
118    If TEXTURE_GEN_MODE indicates EYE_DISTANCE_TO_LINE_SGIS, then the
119    generating function for the coordinate indicated by <coord> is the
120    same as above, but P, D, and V' are redefined as:
121
122	P is a point (px'/pw', py'/pw', pz'/pw') where
123
124					 |px|
125					 |py|
126		(px', py', pz', pw') = M |pz|
127					 |pw|
128
129	D is a direction vector (dx', dy', dz') where
130
131						-1
132		(dx', dy', dz') = (dx, dy, dz) M
133						u
134
135		and M  is the upper leftmost 3x3 matrix taken from the
136		     u
137		modelview matrix.
138
139	V' is (xe/we, ye/we, ze/we)
140
141    In other words, g is the distance in eye coordinates from the
142    vertex to the line defined by point P and direction D.
143
144    xe, ye, ze, and we are the eye coordinates of the vertex.
145
146    P and D are specified together by calling TexGen with <pname> set
147    to EYE_LINE and <params> pointing to an array containing px, py,
148    pz, pw, dx, dy, and dz, respectively.
149
150Additions to Chapter 3 of the 1.0 Specification (Rasterization)
151
152    None
153
154Additions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations
155and the Frame Buffer)
156
157    None
158
159Additions to Chapter 5 of the 1.0 Specification (Special Functions)
160
161    None
162
163Additions to Chapter 6 of the 1.0 Specification (State and State Requests)
164
165    None
166
167New State
168							Initial
169    Get Value			Get Command	Type	Value			Attrib
170    ---------			-----------	----	-------			------
171    EYE_POINT_SGIS		GetTexGeniv	4 x R	{0,0,0,1}		texture
172    OBJECT_POINT_SGIS		GetTexGeniv	4 x R	{0,0,0,1}		texture
173    EYE_LINE_SGIS		GetTexGeniv	7 x R	{0,0,0,1,0,0,1}		texture
174    OBJECT_LINE_SGIS		GetTexGeniv	7 x R	{0,0,0,1,0,0,1}		texture
175
176
177