15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    SGIS_texture_edge_clamp
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_SGIS_texture_edge_clamp
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciVersion
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    $Date: 1997/02/26 03:36:36 $ $Revision: 1.6 $
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciNumber
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ci    35
165bd8deadSopenharmony_ci
175bd8deadSopenharmony_ciDependencies
185bd8deadSopenharmony_ci
195bd8deadSopenharmony_ci    EXT_texture3D affects the definition of this extension
205bd8deadSopenharmony_ci    SGIS_texture_filter4 affects the definition of this extension
215bd8deadSopenharmony_ci
225bd8deadSopenharmony_ciOverview
235bd8deadSopenharmony_ci
245bd8deadSopenharmony_ci    The base OpenGL provides clamping such that the texture coordinates are
255bd8deadSopenharmony_ci    limited to exactly the range [0,1].  When a texture coordinate is
265bd8deadSopenharmony_ci    clamped using this algorithm, the texture sampling filter straddles the
275bd8deadSopenharmony_ci    edge of the texture image, taking 1/2 its sample values from within the
285bd8deadSopenharmony_ci    texture image, and the other 1/2 from the texture border.  It is
295bd8deadSopenharmony_ci    sometimes desirable to clamp a texture without requiring a border, and
305bd8deadSopenharmony_ci    without using the constant border color.
315bd8deadSopenharmony_ci
325bd8deadSopenharmony_ci    This extension defines a new texture clamping algorithm.
335bd8deadSopenharmony_ci    CLAMP_TO_EDGE_SGIS clamps texture coordinates at all mipmap levels such
345bd8deadSopenharmony_ci    that the texture filter never samples a border texel.  When used with a
355bd8deadSopenharmony_ci    NEAREST or a LINEAR filter, the color returned when clamping is derived
365bd8deadSopenharmony_ci    only from texels at the edge of the texture image.  When used with
375bd8deadSopenharmony_ci    FILTER4 filters, the filter operations of CLAMP_TO_EDGE_SGIS are defined
385bd8deadSopenharmony_ci    but don't result in a nice clamp-to-edge color.
395bd8deadSopenharmony_ci
405bd8deadSopenharmony_ci    CLAMP_TO_EDGE_SGIS is supported by 1, 2, and 3-dimensional textures
415bd8deadSopenharmony_ci    only.
425bd8deadSopenharmony_ci
435bd8deadSopenharmony_ciIssues
445bd8deadSopenharmony_ci
455bd8deadSopenharmony_ci    *   Is the arithmetic for FILTER4 filters correct?  Is this the right
465bd8deadSopenharmony_ci	thing to do?
475bd8deadSopenharmony_ci
485bd8deadSopenharmony_ciNew Procedures and Functions
495bd8deadSopenharmony_ci
505bd8deadSopenharmony_ci    None
515bd8deadSopenharmony_ci
525bd8deadSopenharmony_ciNew Tokens
535bd8deadSopenharmony_ci
545bd8deadSopenharmony_ci    Accepted by the <param> parameter of TexParameteri and TexParameterf,
555bd8deadSopenharmony_ci    and by the <params> parameter of TexParameteriv and TexParameterfv, when
565bd8deadSopenharmony_ci    their <pname> parameter is TEXTURE_WRAP_S, TEXTURE_WRAP_T, or
575bd8deadSopenharmony_ci    TEXTURE_WRAP_R_EXT:
585bd8deadSopenharmony_ci
595bd8deadSopenharmony_ci	CLAMP_TO_EDGE_SGIS		0x812F
605bd8deadSopenharmony_ci
615bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.0 Specification (OpenGL Operation)
625bd8deadSopenharmony_ci
635bd8deadSopenharmony_ci    None
645bd8deadSopenharmony_ci
655bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.0 Specification (Rasterization)
665bd8deadSopenharmony_ci
675bd8deadSopenharmony_ci    GL Specification Table 3.7 is updated as follows:
685bd8deadSopenharmony_ci
695bd8deadSopenharmony_ci	Name				Type	    Legal Values
705bd8deadSopenharmony_ci	----				----	    ------------
715bd8deadSopenharmony_ci	TEXTURE_WRAP_S			integer	    CLAMP, REPEAT,
725bd8deadSopenharmony_ci						    CLAMP_TO_EDGE_SGIS
735bd8deadSopenharmony_ci	TEXTURE_WRAP_T			integer	    CLAMP, REPEAT,
745bd8deadSopenharmony_ci						    CLAMP_TO_EDGE_SGIS
755bd8deadSopenharmony_ci	TEXTURE_WRAP_R_EXT		integer	    CLAMP, REPEAT,
765bd8deadSopenharmony_ci						    CLAMP_TO_EDGE_SGIS
775bd8deadSopenharmony_ci	TEXTURE_MIN_FILTER		integer	    NEAREST, LINEAR,
785bd8deadSopenharmony_ci						    NEAREST_MIPMAP_NEAREST,
795bd8deadSopenharmony_ci						    NEAREST_MIPMAP_LINEAR,
805bd8deadSopenharmony_ci						    LINEAR_MIPMAP_NEAREST,
815bd8deadSopenharmony_ci						    LINEAR_MIPMAP_LINEAR,
825bd8deadSopenharmony_ci						    FILTER4_SGIS,
835bd8deadSopenharmony_ci						    LINEAR_CLIPMAP_LINEAR_SGIX
845bd8deadSopenharmony_ci	TEXTURE_MAG_FILTER		integer	    NEAREST, LINEAR,
855bd8deadSopenharmony_ci						    FILTER4_SGIS,
865bd8deadSopenharmony_ci						    LINEAR_DETAIL_SGIS,
875bd8deadSopenharmony_ci						    LINEAR_DETAIL_ALPHA_SGIS,
885bd8deadSopenharmony_ci						    LINEAR_DETAIL_COLOR_SGIS,
895bd8deadSopenharmony_ci						    LINEAR_SHARPEN_SGIS,
905bd8deadSopenharmony_ci						    LINEAR_SHARPEN_ALPHA_SGIS,
915bd8deadSopenharmony_ci						    LINEAR_SHARPEN_COLOR_SGIS,
925bd8deadSopenharmony_ci						    LINEAR_LEQUAL_R_SGIS,
935bd8deadSopenharmony_ci						    LINEAR_GEQUAL_R_SGIS
945bd8deadSopenharmony_ci	TEXTURE_BORDER_COLOR		4 floats    any 4 values in [0,1]
955bd8deadSopenharmony_ci	DETAIL_TEXTURE_LEVEL_SGIS	integer	    any non-negative integer
965bd8deadSopenharmony_ci	DETAIL_TEXTURE_MODE_SGIS	integer	    ADD, MODULATE
975bd8deadSopenharmony_ci	TEXTURE_MIN_LOD_SGIS		float	    any value
985bd8deadSopenharmony_ci	TEXTURE_MAX_LOD_SGIS		float	    any value
995bd8deadSopenharmony_ci	TEXTURE_BASE_LEVEL_SGIS		integer	    any non-negative integer
1005bd8deadSopenharmony_ci	TEXTURE_MAX_LEVEL_SGIS		integer	    any non-negative integer
1015bd8deadSopenharmony_ci	GENERATE_MIPMAP_SGIS		boolean	    TRUE or FALSE
1025bd8deadSopenharmony_ci	TEXTURE_CLIPMAP_OFFSET_SGIX	2 floats    any 2 values
1035bd8deadSopenharmony_ci
1045bd8deadSopenharmony_ci	Table 3.7: Texture parameters and their values.
1055bd8deadSopenharmony_ci
1065bd8deadSopenharmony_ci    CLAMP_TO_EDGE_SGIS texture clamping is specified by calling
1075bd8deadSopenharmony_ci    TexParameteri with <target> set to TEXTURE_1D, TEXTURE_2D, or
1085bd8deadSopenharmony_ci    TEXTURE_3D_EXT, <pname> set to TEXTURE_WRAP_S, TEXTURE_WRAP_T,
1095bd8deadSopenharmony_ci    or TEXTURE_WRAP_R_EXT, and <param> set to CLAMP_TO_EDGE_SGIS.
1105bd8deadSopenharmony_ci
1115bd8deadSopenharmony_ci    Let [min,max] be the range of a clamped texture coordinate, and let N
1125bd8deadSopenharmony_ci    be the size of the 1D, 2D, or 3D texture image in the direction of
1135bd8deadSopenharmony_ci    clamping.  Then in all cases
1145bd8deadSopenharmony_ci
1155bd8deadSopenharmony_ci	max = 1 - min
1165bd8deadSopenharmony_ci
1175bd8deadSopenharmony_ci    because the clamping is always symmetric about the [0,1] mapped range of
1185bd8deadSopenharmony_ci    a texture coordinate.  When used with NEAREST or LINEAR filters,
1195bd8deadSopenharmony_ci    CLAMP_TO_EDGE_SGIS defines a minimum clamping value of
1205bd8deadSopenharmony_ci
1215bd8deadSopenharmony_ci	min = 1 / 2*N
1225bd8deadSopenharmony_ci
1235bd8deadSopenharmony_ci    When used with FILTER4 filters, CLAMP_TO_EDGE_SGIS defines a minimum
1245bd8deadSopenharmony_ci    clamping value of
1255bd8deadSopenharmony_ci
1265bd8deadSopenharmony_ci	min = 3 / 2*N,		N > 2
1275bd8deadSopenharmony_ci
1285bd8deadSopenharmony_ci	min = 1/2		N <= 2
1295bd8deadSopenharmony_ci
1305bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations
1315bd8deadSopenharmony_ciand the Framebuffer)
1325bd8deadSopenharmony_ci
1335bd8deadSopenharmony_ci    None
1345bd8deadSopenharmony_ci
1355bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.0 Specification (Special Functions)
1365bd8deadSopenharmony_ci
1375bd8deadSopenharmony_ci    None
1385bd8deadSopenharmony_ci
1395bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.0 Specification (State and State Requests)
1405bd8deadSopenharmony_ci
1415bd8deadSopenharmony_ci    None
1425bd8deadSopenharmony_ci
1435bd8deadSopenharmony_ciAdditions to the GLX Specification
1445bd8deadSopenharmony_ci
1455bd8deadSopenharmony_ci    None
1465bd8deadSopenharmony_ci
1475bd8deadSopenharmony_ciDependencies on EXT_texture3D
1485bd8deadSopenharmony_ci
1495bd8deadSopenharmony_ci    If EXT_texture3D is not implemented, then the references clamping of 3D
1505bd8deadSopenharmony_ci    textures in this file are invalid, and references to TEXTURE_WRAP_R_EXT
1515bd8deadSopenharmony_ci    should be ignored.
1525bd8deadSopenharmony_ci
1535bd8deadSopenharmony_ciDependencies on SGIS_texture_filter4
1545bd8deadSopenharmony_ci
1555bd8deadSopenharmony_ci    If SGIS_texture_filter4 is not implemented, then discussions about the
1565bd8deadSopenharmony_ci    interaction of filter4 texture filters and the clamping function
1575bd8deadSopenharmony_ci    described in this file are invalid, and should be ignored.
1585bd8deadSopenharmony_ci
1595bd8deadSopenharmony_ciErrors
1605bd8deadSopenharmony_ci
1615bd8deadSopenharmony_ci    None
1625bd8deadSopenharmony_ci
1635bd8deadSopenharmony_ciNew State
1645bd8deadSopenharmony_ci
1655bd8deadSopenharmony_ci    Only the type information changes for these parameters:
1665bd8deadSopenharmony_ci
1675bd8deadSopenharmony_ci    Get Value		Get Command		Type	Initial Value	Attrib
1685bd8deadSopenharmony_ci    ---------		-----------		----	-------------	------
1695bd8deadSopenharmony_ci    TEXTURE_WRAP_S	GetTexParameteriv	n x Z3	REPEAT		texture
1705bd8deadSopenharmony_ci    TEXTURE_WRAP_T	GetTexParameteriv	n x Z3	REPEAT		texture
1715bd8deadSopenharmony_ci    TEXTURE_WRAP_R_EXT	GetTexParameteriv	n x Z3	REPEAT		texture
1725bd8deadSopenharmony_ci
1735bd8deadSopenharmony_ciNew Implementation Dependent State
1745bd8deadSopenharmony_ci
1755bd8deadSopenharmony_ci    None
176