_C_ License Applicability. Except to the extent portions of this file are _C_ made subject to an alternative license as permitted in the SGI Free _C_ Software License B, Version 1.1 (the "License"), the contents of this _C_ file are subject only to the provisions of the License. You may not use _C_ this file except in compliance with the License. You may obtain a copy _C_ of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 _C_ Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: _C_ _C_ http://oss.sgi.com/projects/FreeB _C_ _C_ Note that, as provided in the License, the Software is distributed on an _C_ "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS _C_ DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND _C_ CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A _C_ PARTICULAR PURPOSE, AND NON-INFRINGEMENT. _C_ _C_ Original Code. The Original Code is: OpenGL Sample Implementation, _C_ Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, _C_ Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. _C_ Copyright in any portions created by third parties is as indicated _C_ elsewhere herein. All Rights Reserved. _C_ _C_ Additional Notice Provisions: The application programming interfaces _C_ established by SGI in conjunction with the Original Code are The _C_ OpenGL(R) Graphics System: A Specification (Version 1.2.1), released _C_ April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version _C_ 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X _C_ Window System(R) (Version 1.3), released October 19, 1998. This software _C_ was created using the OpenGL(R) version 1.2.1 Sample Implementation _C_ published by SGI, but has not been independently verified as being _C_ compliant with the OpenGL(R) version 1.2.1 Specification. _C_ _C_ The first character in this file must be an '_'! _C_ Anything on a line after _C_ is ignored _define(_filters,eqn|tbl)_C_ _header(ConvolutionParameter,set convolution parameters) _names(ConvolutionParameter,[fi]) .EQ delim $$ .EN _define(@<__target>@,@<_param1(1)>@)_C_ _define(@<__pname>@,@<_param2(1)>@)_C_ _define(@<__param>@,@<_param3(1)>@)_C_ .sp -1 .SH PARAMETERS _phead(__target) The target for the convolution parameter. Must be one of _const(CONVOLUTION_1D), _const(CONVOLUTION_2D), or _const(SEPARABLE_2D). _phead(__pname) The parameter to be set. Must be _const(CONVOLUTION_BORDER_MODE). _phead(__param) The parameter value. Must be one of _const(REDUCE), _const(CONSTANT_BORDER), _const(REPLICATE_BORDER). .sp 2 _names(ConvolutionParameter,[fi]v) _define(@<__targetv>@,@<_param1(2)>@)_C_ _define(@<__pnamev>@,@<_param2(2)>@)_C_ _define(@<__paramv>@,@<_param3(2)>@)_C_ .sp -1 .SH PARAMETERS _phead(__targetv) The target for the convolution parameter. Must be one of _const(CONVOLUTION_1D), _const(CONVOLUTION_2D), or _const(SEPARABLE_2D). _phead(__pnamev) The parameter to be set. Must be one of _const(CONVOLUTION_BORDER_MODE), _const(CONVOLUTION_BORDER_COLOR), _const(CONVOLUTION_FILTER_SCALE), or _const(CONVOLUTION_FILTER_BIAS). _phead(__paramv) The parameter value. If __pnamev is _const(CONVOLUTION_BORDER_MODE), __paramv must be one of _const(REDUCE), _const(CONSTANT_BORDER), or _const(REPLICATE_BORDER). Otherwise, must be a vector of four values (for red, green, blue, and alpha, respectively) to be used for scaling (when __pnamev is _const(CONVOLUTION_FILTER_SCALE)), or biasing (when __pnamev is _const(CONVOLUTION_FILTER_BIAS)) a convolution filter kernel or setting the constant border color (when __pnamev is _const(CONVOLUTION_BORDER_COLOR). .SH DESCRIPTION _cmnd sets the value of a convolution parameter. .sp __target selects the convolution filter to be affected: _const(CONVOLUTION_1D), _const(CONVOLUTION_2D), or _const(SEPARABLE_2D) for the 1D, 2D, or separable 2D filter, respectively. .sp __pname selects the parameter to be changed. _const(CONVOLUTION_FILTER_SCALE) and _const(CONVOLUTION_FILTER_BIAS) affect the definition of the convolution filter kernel; see _cmnd(ConvolutionFilter1D), _cmnd(ConvolutionFilter2D), and _cmnd(SeparableFilter2D) for details. In these cases, __paramv is an array of four values to be applied to red, green, blue, and alpha values, respectively. The initial value for _const(CONVOLUTION_FILTER_SCALE) is (1, 1, 1, 1), and the initial value for _const(CONVOLUTION_FILTER_BIAS) is (0, 0, 0, 0). .sp A __pname value of _const(CONVOLUTION_BORDER_MODE) controls the convolution border mode. The accepted modes are: .TP _const(REDUCE) The image resulting from convolution is smaller than the source image. If the filter width is $Wf$ and height is $Hf$, and the source image width is $Ws$ and height is $Hs$, then the convolved image width will be $Ws ~-~ Wf ~+~ 1$ and height will be $Hs ~-~ Hf ~+~ 1$. (If this reduction would generate an image with zero or negative width and/or height, the output is simply null, with no error generated.) The coordinates of the image resulting from convolution are zero through $Ws ~-~ Wf$ in width and zero through $Hs ~-~ Hf$ in height. .TP _const(CONSTANT_BORDER) The image resulting from convolution is the same size as the source image, and processed as if the source image were surrounded by pixels with their color specified by the _const(CONVOLUTION_BORDER_COLOR). .TP _const(REPLICATE_BORDER) The image resulting from convolution is the same size as the source image, and processed as if the outermost pixel on the border of the source image were replicated. .SH NOTES _cmnd is present only if _arbstring(imaging) is returned when _cmnd(GetString) is called with an argument of _const(EXTENSIONS). .P In cases where errors can result from the specification of invalid image dimensions, it is the dimensions after convolution that are tested, not the dimensions of the source image. For example, _cmnd(TexImage1D) requires power-of-two image size. When _const(REDUCE) border mode is in effect, the source image must be larger than the final power-of-two size by one less than the size of the 1D filter kernel. .SH ERRORS _const(INVALID_ENUM) is generated if __target is not one of the allowable values. .P _const(INVALID_ENUM) is generated if __pname is not one of the allowable values. .P _const(INVALID_ENUM) is generated if __pname is _const(CONVOLUTION_BORDER_MODE) and __param is not one of _const(REDUCE), _const(CONSTANT_BORDER), or _const(REPLICATE_BORDER). .P _const(INVALID_OPERATION) is generated if _cmnd is executed between the execution of _cmnd(Begin) and the corresponding execution of _cmnd(End). .SH ASSOCIATED GETS _cmnd(GetConvolutionParameter) .SH SEE ALSO _cmnd(ConvolutionFilter1D), _cmnd(ConvolutionFilter2D), _cmnd(SeparableFilter2D), _cmnd(GetConvolutionParameter)