NAME

glConvolutionParameterf, glConvolutionParameteri, glConvolutionParameterfv, glConvolutionParameteriv - set convolution parameters

C SPECIFICATION

void ggllCCoonnvvoolluuttiioonnPPaarraammeetteerrff( GLenum _t_a_r_g_e_t,
                              GLenum _p_n_a_m_e,
                              GLfloat _p_a_r_a_m_s )
void ggllCCoonnvvoolluuttiioonnPPaarraammeetteerrii( GLenum _t_a_r_g_e_t,
                              GLenum _p_n_a_m_e,
                              GLint _p_a_r_a_m_s )

delim $$

PARAMETERS

_t_a_r_g_e_t
The target for the convolution parameter. Must be one of GGLL__CCOONNVVOOLLUUTTIIOONN__11DD, GGLL__CCOONNVVOOLLUUTTIIOONN__22DD, or GGLL__SSEEPPAARRAABBLLEE__22DD.
_p_n_a_m_e
The parameter to be set. Must be GGLL__CCOONNVVOOLLUUTTIIOONN__BBOORRDDEERR__MMOODDEE.
_p_a_r_a_m_s
The parameter value. Must be one of GGLL__RREEDDUUCCEE, GGLL__CCOONNSSTTAANNTT__BBOORRDDEERR, GGLL__RREEPPLLIICCAATTEE__BBOORRDDEERR.

C SPECIFICATION

void ggllCCoonnvvoolluuttiioonnPPaarraammeetteerrffvv( GLenum _t_a_r_g_e_t,
                               GLenum _p_n_a_m_e,
                               const GLfloat _*_p_a_r_a_m_s )
void ggllCCoonnvvoolluuttiioonnPPaarraammeetteerriivv( GLenum _t_a_r_g_e_t,
                               GLenum _p_n_a_m_e,
                               const GLint _*_p_a_r_a_m_s )



PARAMETERS

_t_a_r_g_e_t
The target for the convolution parameter. Must be one of GGLL__CCOONNVVOOLLUUTTIIOONN__11DD, GGLL__CCOONNVVOOLLUUTTIIOONN__22DD, or GGLL__SSEEPPAARRAABBLLEE__22DD.
_p_n_a_m_e
The parameter to be set. Must be one of GGLL__CCOONNVVOOLLUUTTIIOONN__BBOORRDDEERR__MMOODDEE, GGLL__CCOONNVVOOLLUUTTIIOONN__BBOORRDDEERR__CCOOLLOORR, GGLL__CCOONNVVOOLLUUTTIIOONN__FFIILLTTEERR__SSCCAALLEE, or GGLL__CCOONNVVOOLLUUTTIIOONN__FFIILLTTEERR__BBIIAASS.
_p_a_r_a_m_s
The parameter value. If _p_n_a_m_e is GGLL__CCOONNVVOOLLUUTTIIOONN__BBOORRDDEERR__MMOODDEE, _p_a_r_a_m_s must be one of GGLL__RREEDDUUCCEE, GGLL__CCOONNSSTTAANNTT__BBOORRDDEERR, or GGLL__RREEPPLLIICCAATTEE__BBOORRDDEERR. Otherwise, must be a vector of four values (for red, green, blue, and alpha, respectively) to be used for scaling (when _p_n_a_m_e is GGLL__CCOONNVVOOLLUUTTIIOONN__FFIILLTTEERR__SSCCAALLEE), or biasing (when _p_n_a_m_e is GGLL__CCOONNVVOOLLUUTTIIOONN__FFIILLTTEERR__BBIIAASS) a convolution filter kernel or setting the constant border color (when _p_n_a_m_e is GGLL__CCOONNVVOOLLUUTTIIOONN__BBOORRDDEERR__CCOOLLOORR.

DESCRIPTION

ggllCCoonnvvoolluuttiioonnPPaarraammeetteerr sets the value of a convolution parameter.

_t_a_r_g_e_t selects the convolution filter to be affected: GGLL__CCOONNVVOOLLUUTTIIOONN__11DD, GGLL__CCOONNVVOOLLUUTTIIOONN__22DD, or GGLL__SSEEPPAARRAABBLLEE__22DD for the 1D, 2D, or separable 2D filter, respectively.

_p_n_a_m_e selects the parameter to be changed. GGLL__CCOONNVVOOLLUUTTIIOONN__FFIILLTTEERR__SSCCAALLEE and GGLL__CCOONNVVOOLLUUTTIIOONN__FFIILLTTEERR__BBIIAASS affect the definition of the convolution filter kernel; see ggllCCoonnvvoolluuttiioonnFFiilltteerr11DD, ggllCCoonnvvoolluuttiioonnFFiilltteerr22DD, and ggllSSeeppaarraabblleeFFiilltteerr22DD for details. In these cases, _p_a_r_a_m_s is an array of four values to be applied to red, green, blue, and alpha values, respectively. The initial value for GGLL__CCOONNVVOOLLUUTTIIOONN__FFIILLTTEERR__SSCCAALLEE is (1, 1, 1, 1), and the initial value for GGLL__CCOONNVVOOLLUUTTIIOONN__FFIILLTTEERR__BBIIAASS is (0, 0, 0, 0).

A _p_n_a_m_e value of GGLL__CCOONNVVOOLLUUTTIIOONN__BBOORRDDEERR__MMOODDEE controls the convolution border mode. The accepted modes are:
GGLL__RREEDDUUCCEE
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.
GGLL__CCOONNSSTTAANNTT__BBOORRDDEERR
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 GGLL__CCOONNVVOOLLUUTTIIOONN__BBOORRDDEERR__CCOOLLOORR.
GGLL__RREEPPLLIICCAATTEE__BBOORRDDEERR
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.

NOTES

ggllCCoonnvvoolluuttiioonnPPaarraammeetteerr is present only if GGLL__AARRBB__iimmaaggiinngg is returned when ggllGGeettSSttrriinngg is called with an argument of GGLL__EEXXTTEENNSSIIOONNSS.

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, ggllTTeexxIImmaaggee11DD requires power-of-two image size. When GGLL__RREEDDUUCCEE 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.

ERRORS

GGLL__IINNVVAALLIIDD__EENNUUMM is generated if _t_a_r_g_e_t is not one of the allowable values.

GGLL__IINNVVAALLIIDD__EENNUUMM is generated if _p_n_a_m_e is not one of the allowable values.

GGLL__IINNVVAALLIIDD__EENNUUMM is generated if _p_n_a_m_e is GGLL__CCOONNVVOOLLUUTTIIOONN__BBOORRDDEERR__MMOODDEE and _p_a_r_a_m_s is not one of GGLL__RREEDDUUCCEE, GGLL__CCOONNSSTTAANNTT__BBOORRDDEERR, or GGLL__RREEPPLLIICCAATTEE__BBOORRDDEERR.

GGLL__IINNVVAALLIIDD__OOPPEERRAATTIIOONN is generated if ggllCCoonnvvoolluuttiioonnPPaarraammeetteerr is executed between the execution of ggllBBeeggiinn and the corresponding execution of ggllEEnndd.

ASSOCIATED GETS

ggllGGeettCCoonnvvoolluuttiioonnPPaarraammeetteerr

SEE ALSO

ggllCCoonnvvoolluuttiioonnFFiilltteerr11DD((33GG)), ggllCCoonnvvoolluuttiioonnFFiilltteerr22DD((33GG)), ggllSSeeppaarraabblleeFFiilltteerr22DD((33GG)), ggllGGeettCCoonnvvoolluuttiioonnPPaarraammeetteerr((33GG))