15bd8deadSopenharmony_ci
25bd8deadSopenharmony_ciName
35bd8deadSopenharmony_ci
45bd8deadSopenharmony_ci    HP_convolution_border_modes
55bd8deadSopenharmony_ci
65bd8deadSopenharmony_ciName Strings
75bd8deadSopenharmony_ci
85bd8deadSopenharmony_ci    GL_HP_convolution_border_modes
95bd8deadSopenharmony_ci
105bd8deadSopenharmony_ciVersion
115bd8deadSopenharmony_ci
125bd8deadSopenharmony_ci    $Date: 1997/06/12 01:51:36 $ $Revision: 1.3 $
135bd8deadSopenharmony_ci
145bd8deadSopenharmony_ciNumber
155bd8deadSopenharmony_ci
165bd8deadSopenharmony_ci    67
175bd8deadSopenharmony_ci
185bd8deadSopenharmony_ciDependencies
195bd8deadSopenharmony_ci
205bd8deadSopenharmony_ci    EXT_convolution is required
215bd8deadSopenharmony_ci
225bd8deadSopenharmony_ciOverview
235bd8deadSopenharmony_ci
245bd8deadSopenharmony_ci    This extension provides some additional border modes for the
255bd8deadSopenharmony_ci    EXT_convolution extension.
265bd8deadSopenharmony_ci
275bd8deadSopenharmony_ciNew Procedures and Functions
285bd8deadSopenharmony_ci
295bd8deadSopenharmony_ci    None
305bd8deadSopenharmony_ci
315bd8deadSopenharmony_ciNew Tokens
325bd8deadSopenharmony_ci
335bd8deadSopenharmony_ci    Accepted by the <param> parameter of ConvolutionParameteriEXT,
345bd8deadSopenharmony_ci    and ConvolutionParameterfEXT, and by the <params> parameter of
355bd8deadSopenharmony_ci    ConvolutionParameterivEXT and ConvolutionParameterfvEXT, when the
365bd8deadSopenharmony_ci    <pname> parameter is CONVOLUTION_BORDER_MODE_EXT:
375bd8deadSopenharmony_ci
385bd8deadSopenharmony_ci	IGNORE_BORDER_HP
395bd8deadSopenharmony_ci	CONSTANT_BORDER_HP
405bd8deadSopenharmony_ci	REPLICATE_BORDER_HP
415bd8deadSopenharmony_ci
425bd8deadSopenharmony_ci    Accepted by the <pname> parameter of ConvolutionParameterivEXT,
435bd8deadSopenharmony_ci    ConvolutionParameterfvEXT, GetConvolutionParameterivEXT, and
445bd8deadSopenharmony_ci    GetConvolutionParameterfvEXT:
455bd8deadSopenharmony_ci
465bd8deadSopenharmony_ci	CONVOLUTION_BORDER_COLOR_HP
475bd8deadSopenharmony_ci
485bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.0 Specification (OpenGL Operation)
495bd8deadSopenharmony_ci
505bd8deadSopenharmony_ci    None
515bd8deadSopenharmony_ci
525bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.0 Specification (Rasterization)
535bd8deadSopenharmony_ci
545bd8deadSopenharmony_ci    The description of the convolution border mode is replaced with
555bd8deadSopenharmony_ci    the following:
565bd8deadSopenharmony_ci
575bd8deadSopenharmony_ci    The convolution border mode for a specific convolution filter is
585bd8deadSopenharmony_ci    specified using ConvolutionParameteriEXT with the <target>
595bd8deadSopenharmony_ci    parameter set to the name of the filter, the <pname> parameter
605bd8deadSopenharmony_ci    set to CONVOLUTION_BORDER_MODE_EXT, and <param> set to one of
615bd8deadSopenharmony_ci    REDUCE_EXT, IGNORE_BORDER_HP, CONSTANT_BORDER_HP,
625bd8deadSopenharmony_ci    or REPLICATE_BORDER_HP.
635bd8deadSopenharmony_ci
645bd8deadSopenharmony_ci    The width and height of source images convolved with border mode
655bd8deadSopenharmony_ci    REDUCE_EXT are reduced by Wf-1 and Hf-1, respectively.  If this
665bd8deadSopenharmony_ci    reduction would generate a resulting image with zero or negative
675bd8deadSopenharmony_ci    width and/or height, the output is simply null, with no error
685bd8deadSopenharmony_ci    generated.  The coordinates of the image that results from a
695bd8deadSopenharmony_ci    convolution with border mode REDUCE_EXT are zero through Ws-Wf
705bd8deadSopenharmony_ci    in width, and zero through Hs-Hf in height.  In cases where
715bd8deadSopenharmony_ci    errors can result from the specification of invalid image
725bd8deadSopenharmony_ci    dimensions, it is these resulting dimensions that are tested,
735bd8deadSopenharmony_ci    not the dimensions of the source image.  (A specific example is
745bd8deadSopenharmony_ci    TexImage1D and TexImage2D, which specify constraints for image
755bd8deadSopenharmony_ci    dimensions.  Even if TexImage1D or TexImage2D is called with a
765bd8deadSopenharmony_ci    null pixel pointer, the dimensions of the resulting texture image
775bd8deadSopenharmony_ci    are those that would result from the convolution of the specified
785bd8deadSopenharmony_ci    image.)  
795bd8deadSopenharmony_ci
805bd8deadSopenharmony_ci    For the remaining border modes, we define Cw = floor(Wf / 2)
815bd8deadSopenharmony_ci    and Ch = floor(Hf / 2).  The coordinates (Cw, Ch) define the
825bd8deadSopenharmony_ci    center of the convolution filter.
835bd8deadSopenharmony_ci
845bd8deadSopenharmony_ci    If the convolution border mode is IGNORE_BORDER_HP, the output
855bd8deadSopenharmony_ci    image has the same dimensions as the source image.  The convolution
865bd8deadSopenharmony_ci    filter is moved around the source image so that its center passes
875bd8deadSopenharmony_ci    over every pixel in the source image.  At each location, the sum of
885bd8deadSopenharmony_ci    products is computed and the result is written in the destination
895bd8deadSopenharmony_ci    image at the location that corresponds to the pixel location where
905bd8deadSopenharmony_ci    the convolution filter is centered.  However, the sum of products
915bd8deadSopenharmony_ci    is not computed for any pixel where the convolution filter extends
925bd8deadSopenharmony_ci    beyond one of the edges of the source image.  Instead, for these
935bd8deadSopenharmony_ci    locations, the pixel value from the source image is copied to
945bd8deadSopenharmony_ci    the destination image.
955bd8deadSopenharmony_ci
965bd8deadSopenharmony_ci    If the convolution border mode is CONSTANT_BORDER_HP then
975bd8deadSopenharmony_ci    convolution does not change the size of the source image.  The
985bd8deadSopenharmony_ci    result of the convolution is the same as if the source image were
995bd8deadSopenharmony_ci    surrounded by pixels with the same color as the current convolution
1005bd8deadSopenharmony_ci    border color.  Whenever the convolution filter extends beyond one
1015bd8deadSopenharmony_ci    of the edges of the source image, the constant-color border pixels
1025bd8deadSopenharmony_ci    are used as input to the filter.  The current convolution border
1035bd8deadSopenharmony_ci    color is set by calling ConvolutionParameterivEXT or
1045bd8deadSopenharmony_ci    ConvolutionParameterfvEXT with <pname> set to
1055bd8deadSopenharmony_ci    CONVOLUTION_BORDER_COLOR_HP and <params> containing
1065bd8deadSopenharmony_ci    four values that comprise the RGBA color to be used as the image
1075bd8deadSopenharmony_ci    border.  Integer color components are interpreted linearly such that
1085bd8deadSopenharmony_ci    the most positive integer maps to 1.0, and the most negative integer
1095bd8deadSopenharmony_ci    maps to -1.0.  Floating point color components are clamped to the
1105bd8deadSopenharmony_ci    range [0,1] when they are specified.
1115bd8deadSopenharmony_ci
1125bd8deadSopenharmony_ci    The convolution border mode REPLICATE_BORDER_HP also produces an
1135bd8deadSopenharmony_ci    output image with the same dimensions as the source image.  The
1145bd8deadSopenharmony_ci    behavior of this mode is identical to that of the IGNORE_BORDER_HP
1155bd8deadSopenharmony_ci    mode except for the treatment of pixel locations where the
1165bd8deadSopenharmony_ci    convolution filter extends beyond the edge of the source image.
1175bd8deadSopenharmony_ci    For these locations, it is as if the outermost one-pixel border
1185bd8deadSopenharmony_ci    of the source image was replicated.  Conceptually, each pixel
1195bd8deadSopenharmony_ci    in the leftmost one-pixel column of the source image is replicated
1205bd8deadSopenharmony_ci    Cw times to provide additional image data along the left edge,
1215bd8deadSopenharmony_ci    each pixel in the rightmost one-pixel column is replicated Cw times
1225bd8deadSopenharmony_ci    to provide additional image data along the right edge, and each
1235bd8deadSopenharmony_ci    pixel value in the top and bottom one-pixel rows is replicated to
1245bd8deadSopenharmony_ci    create Ch rows of image data along the top and bottom edges.
1255bd8deadSopenharmony_ci    The pixel value at each corner is also replicated in order to
1265bd8deadSopenharmony_ci    provide data for the convolution operation at each corner of
1275bd8deadSopenharmony_ci    the source image.
1285bd8deadSopenharmony_ci    
1295bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations
1305bd8deadSopenharmony_ciand the Frame buffer)
1315bd8deadSopenharmony_ci
1325bd8deadSopenharmony_ci    None
1335bd8deadSopenharmony_ci
1345bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.0 Specification (Special Functions)
1355bd8deadSopenharmony_ci
1365bd8deadSopenharmony_ci    None
1375bd8deadSopenharmony_ci
1385bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.0 Specification (State and State Requests)
1395bd8deadSopenharmony_ci
1405bd8deadSopenharmony_ci    None
1415bd8deadSopenharmony_ci
1425bd8deadSopenharmony_ciDependencies on EXT_convolution
1435bd8deadSopenharmony_ci
1445bd8deadSopenharmony_ci    EXT_convolution is required.  This extension adds capability to
1455bd8deadSopenharmony_ci    the convolution operations defined in that extension.
1465bd8deadSopenharmony_ci
1475bd8deadSopenharmony_ciErrors
1485bd8deadSopenharmony_ci
1495bd8deadSopenharmony_ci    INVALID_ENUM is generated if ConvolutionParameterivEXT or
1505bd8deadSopenharmony_ci    ConvolutionParameterfvEXT parameter <pname> is not
1515bd8deadSopenharmony_ci    CONVOLUTION_FILTER_SCALE_EXT, CONVOLUTION_FILTER_BIAS_EXT,
1525bd8deadSopenharmony_ci    CONVOLUTION_BORDER_MODE_EXT, or CONVOLUTION_BORDER_COLOR_HP.
1535bd8deadSopenharmony_ci
1545bd8deadSopenharmony_ci    INVALID_ENUM is generated if ConvolutionParameteriEXT,
1555bd8deadSopenharmony_ci    ConvolutionParameterfEXT, ConvolutionParameterivEXT, or
1565bd8deadSopenharmony_ci    ConvolutionParameterfvEXT parameter <pname> is
1575bd8deadSopenharmony_ci    CONVOLUTION_BORDER_MODE_EXT and parameter <params> is
1585bd8deadSopenharmony_ci    not one of REDUCE_EXT, IGNORE_BORDER_HP, CONSTANT_BORDER_HP,
1595bd8deadSopenharmony_ci    or REPLICATE_BORDER_HP.
1605bd8deadSopenharmony_ci
1615bd8deadSopenharmony_ci    INVALID_ENUM is generated if GetConvolutionParameterivEXT or
1625bd8deadSopenharmony_ci    GetConvolutionParameterfvEXT parameter <pname> is not
1635bd8deadSopenharmony_ci    CONVOLUTION_FILTER_SCALE_EXT, CONVOLUTION_FILTER_BIAS_EXT,
1645bd8deadSopenharmony_ci    CONVOLUTION_BORDER_MODE_EXT, CONVOLUTION_FORMAT_EXT,
1655bd8deadSopenharmony_ci    CONVOLUTION_WIDTH_EXT, CONVOLUTION_HEIGHT_EXT,
1665bd8deadSopenharmony_ci    MAX_CONVOLUTION_WIDTH_EXT, MAX_CONVOLUTION_HEIGHT_EXT,
1675bd8deadSopenharmony_ci    or CONVOLUTION_BORDER_COLOR_HP.
1685bd8deadSopenharmony_ci
1695bd8deadSopenharmony_ciNew State
1705bd8deadSopenharmony_ci									 Initial
1715bd8deadSopenharmony_ci    Get Value				Get Command		Type	  Value 	Attrib
1725bd8deadSopenharmony_ci    ---------				-----------		----	 -------	------
1735bd8deadSopenharmony_ci    CONVOLUTION_BORDER_COLOR_HP	   GetConvolutionParameterfvHP	 C	(0,0,0,0)	pixel
1745bd8deadSopenharmony_ci
1755bd8deadSopenharmony_ciNew Implementation Dependent State
1765bd8deadSopenharmony_ci
1775bd8deadSopenharmony_ci    None
178