skia / external / github.com / KhronosGroup / OpenGL-Registry / eae1d6dde1e283f6fdf803274a2484007e592599 / . / extensions / SGIS / SGIS_point_line_texgen.txt

Name | |

SGIS_point_line_texgen | |

Name Strings | |

GL_SGIS_point_line_texgen | |

Version | |

Last Modified Date: April 3, 1999 | |

Author Revision: $Header: //depot/main/doc/registry/extensions/SGI/point_line_texgen.spec#4 $ | |

Number | |

213 | |

Dependencies | |

OpenGL 1.1 is required. | |

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_POINT_SGIS 0x81F0 | |

OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1 | |

EYE_DISTANCE_TO_LINE_SGIS 0x81F2 | |

OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3 | |

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

EYE_POINT_SGIS 0x81F4 | |

OBJECT_POINT_SGIS 0x81F5 | |

EYE_LINE_SGIS 0x81F6 | |

OBJECT_LINE_SGIS 0x81F7 | |

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

If TEXTURE_GEN_MODE indicates OBJECT_DISTANCE_TO_POINT_SGIS, then the | |

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

g = || V' - P || | |

where | |

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

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

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

vertex to P. | |

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

P is specified by calling TexGen with <pname> set to OBJECT_POINT and | |

<params> pointing to an array containing px, py, pz, and pw, respectively. | |

If TEXTURE_GEN_MODE indicates EYE_DISTANCE_TO_POINT_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| | |

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

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

vertex to P. | |

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

P is specified by calling TexGen with <pname> set to EYE_POINT and | |

<params> pointing to an array containing px, py, pz, and pw, respectively. | |

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. | |

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

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

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

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_POINT_SGIS GetTexGeniv 4 x R {0,0,0,1} texture | |

OBJECT_POINT_SGIS GetTexGeniv 4 x R {0,0,0,1} texture | |

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 | |