skia / external / github.com / KhronosGroup / OpenGL-Registry / 108-cleanup-xml / . / extensions / SGIS / SGIS_line_texgen.txt

Name | |

SGIS_line_texgen | |

Name Strings | |

GL_SGIS_line_texgen | |

Version | |

$Date: 1999/04/03 08:40:53 $ $Revision: 1.3 $ | |

Number | |

?? | |

Dependencies | |

Overview | |

This extension adds two texture coordinate generation modes, both | |

which generate a texture coordinate based on the minimum distance | |

from a vertex to a specified line. | |

New Procedures and Functions | |

None | |

New Tokens | |

Accepted by the <params> parameters of TexGeni, TexGenf, TexGend, | |

TexGeniv, TexGenfv, and TexGendv: | |

EYE_DISTANCE_TO_LINE_SGIS | |

OBJECT_DISTANCE_TO_LINE_SGIS | |

Accepted by the <pname> parameters of TexGeniv, TexGenfv, and TexGendv: | |

EYE_LINE_SGIS | |

OBJECT_LINE_SGIS | |

Additions to Chapter 2 of the 1.0 Specification (OpenGL Operation) | |

If TEXTURE_GEN_MODE indicates OBJECT_DISTANCE_TO_LINE_SGIS, then the | |

generating function for the coordinate indicated by <coord> is | |

g = || O - (O (dot) D') * D' || | |

where | |

P is a point (px/pw, py/pw, pz/pw) | |

D is a vector (dx, dy, dz) | |

D' is the normalized form of D | |

V' is (xo/wo, yo/wo, zo/wo) | |

O = V' - P | |

In other words, g is the distance in object coordinates from the | |

vertex to the line defined by point P and direction D. | |

xo, yo, zo, and wo are the object coordinates of the vertex. | |

P and D are specified together by calling TexGen with <pname> set | |

to OBJECT_LINE and <params> pointing to an array containing px, py, | |

pz, pw, dx, dy, and dz, respectively. | |

If TEXTURE_GEN_MODE indicates EYE_DISTANCE_TO_LINE_SGIS, then the | |

generating function for the coordinate indicated by <coord> is the | |

same as above, but P, D, and V' are redefined as: | |

P is a point (px'/pw', py'/pw', pz'/pw') where | |

|px| | |

|py| | |

(px', py', pz', pw') = M |pz| | |

|pw| | |

D is a direction vector (dx', dy', dz') where | |

-1 | |

(dx', dy', dz') = (dx, dy, dz) M | |

u | |

and M is the upper leftmost 3x3 matrix taken from the | |

u | |

modelview matrix. | |

V' is (xe/we, ye/we, ze/we) | |

In other words, g is the distance in eye coordinates from the | |

vertex to the line defined by point P and direction D. | |

xe, ye, ze, and we are the eye coordinates of the vertex. | |

Additions to Chapter 3 of the 1.0 Specification (Rasterization) | |

None | |

Additions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations | |

and the Frame Buffer) | |

None | |

Additions to Chapter 5 of the 1.0 Specification (Special Functions) | |

None | |

Additions to Chapter 6 of the 1.0 Specification (State and State Requests) | |

None | |

New State | |

Initial | |

Get Value Get Command Type Value Attrib | |

--------- ----------- ---- ------- ------ | |

EYE_LINE_SGIS GetTexGeniv 7 x R {0,0,0,1,0,0,1} texture | |

OBJECT_LINE_SGIS GetTexGeniv 7 x R {0,0,0,1,0,0,1} texture | |