15bd8deadSopenharmony_ciXXX - Not complete yet!!!
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ciName
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ci    SGIX_texture_phase
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ciName Strings
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ci    GL_SGIX_texture_phase
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ciVersion
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ci    $Date: 1997/12/08 19:59:59 $ $Revision: 1.3 $
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ciNumber
165bd8deadSopenharmony_ci
175bd8deadSopenharmony_ci    ??
185bd8deadSopenharmony_ci
195bd8deadSopenharmony_ciDependencies
205bd8deadSopenharmony_ci
215bd8deadSopenharmony_ci    None
225bd8deadSopenharmony_ci
235bd8deadSopenharmony_ciOverview
245bd8deadSopenharmony_ci
255bd8deadSopenharmony_ci    This extension allows textures to filtered using a modified LINEAR
265bd8deadSopenharmony_ci    filter that treats the texture data as phase angle.  (In addition
275bd8deadSopenharmony_ci    to the NEAREST and LINEAR filters defined in the original GL
285bd8deadSopenharmony_ci    Specification.) Such filtering is useful for dopler data where
295bd8deadSopenharmony_ci    texel values correspond to positions on a unit circle or phase
305bd8deadSopenharmony_ci    angles.
315bd8deadSopenharmony_ci
325bd8deadSopenharmony_ciIssues
335bd8deadSopenharmony_ci
345bd8deadSopenharmony_ci    *	
355bd8deadSopenharmony_ci
365bd8deadSopenharmony_ciReasoning
375bd8deadSopenharmony_ci
385bd8deadSopenharmony_ci    *	
395bd8deadSopenharmony_ci
405bd8deadSopenharmony_ciNew Procedures and Functions
415bd8deadSopenharmony_ci
425bd8deadSopenharmony_ci    None
435bd8deadSopenharmony_ci
445bd8deadSopenharmony_ciNew Tokens
455bd8deadSopenharmony_ci
465bd8deadSopenharmony_ci    Accepted by the <param> parameter of TexParameteri and
475bd8deadSopenharmony_ci    TexParameterf, and by the <params> parameter of TexParameteriv and
485bd8deadSopenharmony_ci    TexParameterfv, when their <pname> parameter is
495bd8deadSopenharmony_ci    TEXTURE_MIN_FILTER or TEXTURE_MAG_FILTER:
505bd8deadSopenharmony_ci
515bd8deadSopenharmony_ci	PHASE_SGIX		0x832A
525bd8deadSopenharmony_ci
535bd8deadSopenharmony_ciAdditions to Chapter 2 of the GL Specification (OpenGL Operation)
545bd8deadSopenharmony_ci
555bd8deadSopenharmony_ci    None
565bd8deadSopenharmony_ci
575bd8deadSopenharmony_ciAdditions to Chapter 3 of the GL Specification (Rasterization)
585bd8deadSopenharmony_ci
595bd8deadSopenharmony_ci    The additional token value PHASE_SGIS is accepted as an enumerated
605bd8deadSopenharmony_ci    value for the texture minification and magnification filters, causing 
615bd8deadSopenharmony_ci    Table 3.7 to be replaced with the table below:
625bd8deadSopenharmony_ci
635bd8deadSopenharmony_ci	Name				Type		Legal Values
645bd8deadSopenharmony_ci	----				----		------------
655bd8deadSopenharmony_ci	TEXTURE_WRAP_S			integer		CLAMP, REPEAT
665bd8deadSopenharmony_ci	TEXTURE_WRAP_T			integer		CLAMP, REPEAT
675bd8deadSopenharmony_ci	TEXTURE_WRAP_R_EXT		integer		CLAMP, REPEAT
685bd8deadSopenharmony_ci	TEXTURE_MIN_FILTER		integer		NEAREST, LINEAR,
695bd8deadSopenharmony_ci							NEAREST_MIPMAP_NEAREST,
705bd8deadSopenharmony_ci							NEAREST_MIPMAP_LINEAR,
715bd8deadSopenharmony_ci							LINEAR_MIPMAP_NEAREST,
725bd8deadSopenharmony_ci							LINEAR_MIPMAP_LINEAR,
735bd8deadSopenharmony_ci							FILTER4_SGIS,
745bd8deadSopenharmony_ci							PHASE_SGIS
755bd8deadSopenharmony_ci	TEXTURE_MAG_FILTER		integer		NEAREST, LINEAR,
765bd8deadSopenharmony_ci							FILTER4_SGIS,
775bd8deadSopenharmony_ci							PHASE_SGIX
785bd8deadSopenharmony_ci	TEXTURE_BORDER_COLOR		4 floats	any 4 values in [0,1]
795bd8deadSopenharmony_ci
805bd8deadSopenharmony_ci	Table 3.7: Texture parameters and their values.
815bd8deadSopenharmony_ci
825bd8deadSopenharmony_ci    Phase filtering is specified by calling TexParameteri,
835bd8deadSopenharmony_ci    TexParameterf, TexParameteriv, or TexParameterfv with <pname> set
845bd8deadSopenharmony_ci    to TEXTURE_MIN_FILTER or TEXTURE_MAG_FILTER, and <param> or <params> 
855bd8deadSopenharmony_ci    set to PHASE_SGIS. Because phase filtering is defined only for
865bd8deadSopenharmony_ci    non-mipmapped textures, there is no difference between its
875bd8deadSopenharmony_ci    definition for minification and magnification.
885bd8deadSopenharmony_ci
895bd8deadSopenharmony_ci    First consider the 1-dimensional case.  Let T be a computed texture
905bd8deadSopenharmony_ci    value (one of R_t, G_t, B_t, or A_t).  Let T[i] be the component
915bd8deadSopenharmony_ci    value of the texel at location i in a 1-dimensional texture image.
925bd8deadSopenharmony_ci    Then, if the appropriate texture filter mode is PHASE_SGIX, a
935bd8deadSopenharmony_ci    2-texel group is selected:
945bd8deadSopenharmony_ci
955bd8deadSopenharmony_ci
965bd8deadSopenharmony_ci	      /	floor(u - 1/2) mod 2**n,	TEXTURE_WRAP_S is REPEAT
975bd8deadSopenharmony_ci	i0 = (
985bd8deadSopenharmony_ci	      \	floor(u - 1/2),			TEXTURE_WRAP_S is CLAMP
995bd8deadSopenharmony_ci
1005bd8deadSopenharmony_ci
1015bd8deadSopenharmony_ci	      /	(i0 + 1) mod 2**n,		TEXTURE_WRAP_S is REPEAT
1025bd8deadSopenharmony_ci	i1 = (
1035bd8deadSopenharmony_ci	      \	i0 + 1,				TEXTURE_WRAP_S is CLAMP
1045bd8deadSopenharmony_ci
1055bd8deadSopenharmony_ci
1065bd8deadSopenharmony_ci   Let
1075bd8deadSopenharmony_ci   
1085bd8deadSopenharmony_ci	A = frac(u - 1/2)
1095bd8deadSopenharmony_ci
1105bd8deadSopenharmony_ci    where frac(x) denotes the fractional part of x, and u is the
1115bd8deadSopenharmony_ci    texture image coordinate in the s direction, as illustrated in
1125bd8deadSopenharmony_ci    Figure 3.10 of the GL Specification.  Then the texture value T is
1135bd8deadSopenharmony_ci    found as:
1145bd8deadSopenharmony_ci
1155bd8deadSopenharmony_ci	t0 = T[i0]
1165bd8deadSopenharmony_ci	t1 = T[i1]
1175bd8deadSopenharmony_ci	del = t1 - t0
1185bd8deadSopenharmony_ci	if |del| > 0.5 then
1195bd8deadSopenharmony_ci	    t0 = t0 + sign(del)
1205bd8deadSopenharmony_ci	T = frac((1-A) * t0 + A * t1)
1215bd8deadSopenharmony_ci
1225bd8deadSopenharmony_ci    If any of the selected T[i] in the above equation refer to a border
1235bd8deadSopenharmony_ci    texel with unspecified value, then the border color given by the
1245bd8deadSopenharmony_ci    current setting of TEXTURE_BORDER_COLOR is used instead of the
1255bd8deadSopenharmony_ci    unspecified value.
1265bd8deadSopenharmony_ci
1275bd8deadSopenharmony_ci    For 2-dimensional textures the calculations for i0, i1, and
1285bd8deadSopenharmony_ci    A are identical to the 1-dimensional case.  A 4-texel group is
1295bd8deadSopenharmony_ci    selected, requiring two j values computed as
1305bd8deadSopenharmony_ci
1315bd8deadSopenharmony_ci
1325bd8deadSopenharmony_ci	      /	floor(v - 1/2) mod 2**m,	TEXTURE_WRAP_T is REPEAT
1335bd8deadSopenharmony_ci	j0 = (
1345bd8deadSopenharmony_ci	      \	floor(v - 1/2),			TEXTURE_WRAP_T is CLAMP
1355bd8deadSopenharmony_ci
1365bd8deadSopenharmony_ci
1375bd8deadSopenharmony_ci	      /	(j0 + 1) mod 2**m,		TEXTURE_WRAP_T is REPEAT
1385bd8deadSopenharmony_ci	j1 = (
1395bd8deadSopenharmony_ci	      \	j0 + 1,				TEXTURE_WRAP_T is CLAMP
1405bd8deadSopenharmony_ci
1415bd8deadSopenharmony_ci    Let
1425bd8deadSopenharmony_ci
1435bd8deadSopenharmony_ci	B = frac(v - 1/2)
1445bd8deadSopenharmony_ci
1455bd8deadSopenharmony_ci    where v is the texture image coordinate in the t direction, as
1465bd8deadSopenharmony_ci    illustrated in Figure 3.10 of the GL Specification.  Then the
1475bd8deadSopenharmony_ci    texture value T is found as:
1485bd8deadSopenharmony_ci
1495bd8deadSopenharmony_ci	t00 = T[i0,j0]
1505bd8deadSopenharmony_ci	t01 = T[i0,j1]
1515bd8deadSopenharmony_ci	t10 = T[i1,j0]
1525bd8deadSopenharmony_ci	t11 = T[i1,j1]
1535bd8deadSopenharmony_ci	del = t10 - t00
1545bd8deadSopenharmony_ci	if |del| > 0.5 then
1555bd8deadSopenharmony_ci	    t00 = t00 + sign(del)
1565bd8deadSopenharmony_ci	t0 = frac((1-A) * t00 + A * t10)
1575bd8deadSopenharmony_ci	del = t11 - t01
1585bd8deadSopenharmony_ci	if |del| > 0.5 then
1595bd8deadSopenharmony_ci	    t01 = t01 + sign(del)
1605bd8deadSopenharmony_ci	t1 = frac((1-A) * t01 + A * t11)
1615bd8deadSopenharmony_ci	del = t1 - t0
1625bd8deadSopenharmony_ci	if |del| > 0.5 then
1635bd8deadSopenharmony_ci	    t0 = t0 + sign(del)
1645bd8deadSopenharmony_ci	T = frac((1-A) * t0 + A * t1)
1655bd8deadSopenharmony_ci
1665bd8deadSopenharmony_ci    If any of the selected T[i,j] in the above equation refer to a
1675bd8deadSopenharmony_ci    border texel with unspecified value, then the border color given by
1685bd8deadSopenharmony_ci    the current setting of TEXTURE_BORDER_COLOR is used instead of the
1695bd8deadSopenharmony_ci    unspecified value.
1705bd8deadSopenharmony_ci
1715bd8deadSopenharmony_ci    Phase texture filtering is similarly defined for 3-dimensional
1725bd8deadSopenharmony_ci    textures.
1735bd8deadSopenharmony_ci
1745bd8deadSopenharmony_ci
1755bd8deadSopenharmony_ciAdditions to Chapter 4 of the GL Specification (Per-Fragment Operations
1765bd8deadSopenharmony_ciand the Framebuffer)
1775bd8deadSopenharmony_ci
1785bd8deadSopenharmony_ci    None
1795bd8deadSopenharmony_ci
1805bd8deadSopenharmony_ciAdditions to Chapter 5 of the GL Specification (Special Functions)
1815bd8deadSopenharmony_ci
1825bd8deadSopenharmony_ci    None
1835bd8deadSopenharmony_ci
1845bd8deadSopenharmony_ciAdditions to Chapter 6 of the GL Specification (State and State Requests)
1855bd8deadSopenharmony_ci
1865bd8deadSopenharmony_ci    None
1875bd8deadSopenharmony_ci
1885bd8deadSopenharmony_ciAdditions to the GLX Specification
1895bd8deadSopenharmony_ci
1905bd8deadSopenharmony_ci    None
1915bd8deadSopenharmony_ci
1925bd8deadSopenharmony_ciGLX Protocol
1935bd8deadSopenharmony_ci
1945bd8deadSopenharmony_ci    
1955bd8deadSopenharmony_ciErrors
1965bd8deadSopenharmony_ci
1975bd8deadSopenharmony_ci
1985bd8deadSopenharmony_ciNew State
1995bd8deadSopenharmony_ci
2005bd8deadSopenharmony_ci
2015bd8deadSopenharmony_ciNew Implementation Dependent State
2025bd8deadSopenharmony_ci
203