~ubuntu-branches/ubuntu/gutsy/vnc4/gutsy

« back to all changes in this revision

Viewing changes to unix/xc/doc/man/GL/gl/convolutionfilter2d.3gl

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2006-05-15 20:35:17 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060515203517-l4lre1ku942mn26k
Tags: 4.1.1+X4.3.0-10
* Correction of critical security issue. Thanks to Martin Kogler
  <e9925248@student.tuwien.ac.at> that informed me about the issue,
  and provided the patch.
  This flaw was originally found by Steve Wiseman of intelliadmin.com.
* Applied patch from Javier Kohen <jkohen@users.sourceforge.net> that
  inform the user that only 8 first characters of the password will
  actually be used when typing more than 8 characters, closes:
  #355619.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
'\" t
 
2
'\"! tbl | mmdoc
 
3
'\"macro stdmacro
 
4
.ds Vn Version 1.2
 
5
.ds Dt 24 September 1999
 
6
.ds Re Release 1.2.1
 
7
.ds Dp Jan 14 18:30
 
8
.ds Dm 01 convoluti
 
9
.ds Xs 37578 9 convolutionfilter2d.gl
 
10
.TH GLCONVOLUTIONFILTER2D 3G
 
11
.SH NAME
 
12
.B "glConvolutionFilter2D
 
13
\- define a two-dimensional convolution filter
 
14
 
 
15
.SH C SPECIFICATION
 
16
void \f3glConvolutionFilter2D\fP(
 
17
GLenum \fItarget\fP,
 
18
.nf
 
19
.ta \w'\f3void \fPglConvolutionFilter2D( 'u
 
20
        GLenum \fIinternalformat\fP,
 
21
        GLsizei \fIwidth\fP,
 
22
        GLsizei \fIheight\fP,
 
23
        GLenum \fIformat\fP,
 
24
        GLenum \fItype\fP,
 
25
        const GLvoid \fI*image\fP )
 
26
.fi
 
27
 
 
28
.SH PARAMETERS
 
29
.TP \w'\fIinternalformat\fP\ \ 'u 
 
30
\f2target\fP
 
31
Must be \%\f3GL_CONVOLUTION_2D\fP.
 
32
.TP
 
33
\f2internalformat\fP
 
34
The internal  of the convolution filter kernel.
 
35
The allowable values are
 
36
\%\f3GL_ALPHA\fP,
 
37
\%\f3GL_ALPHA4\fP,
 
38
\%\f3GL_ALPHA8\fP,
 
39
\%\f3GL_ALPHA12\fP,
 
40
\%\f3GL_ALPHA16\fP,
 
41
\%\f3GL_LUMINANCE\fP,
 
42
\%\f3GL_LUMINANCE4\fP,
 
43
\%\f3GL_LUMINANCE8\fP,
 
44
\%\f3GL_LUMINANCE12\fP,
 
45
\%\f3GL_LUMINANCE16\fP,
 
46
\%\f3GL_LUMINANCE_ALPHA\fP,
 
47
\%\f3GL_LUMINANCE4_ALPHA4\fP,
 
48
\%\f3GL_LUMINANCE6_ALPHA2\fP,
 
49
\%\f3GL_LUMINANCE8_ALPHA8\fP,
 
50
\%\f3GL_LUMINANCE12_ALPHA4\fP,
 
51
\%\f3GL_LUMINANCE12_ALPHA12\fP,
 
52
\%\f3GL_LUMINANCE16_ALPHA16\fP,
 
53
\%\f3GL_INTENSITY\fP,
 
54
\%\f3GL_INTENSITY4\fP,
 
55
\%\f3GL_INTENSITY8\fP,
 
56
\%\f3GL_INTENSITY12\fP,
 
57
\%\f3GL_INTENSITY16\fP,
 
58
\%\f3GL_R3_G3_B2\fP,
 
59
\%\f3GL_RGB\fP,
 
60
\%\f3GL_RGB4\fP,
 
61
\%\f3GL_RGB5\fP,
 
62
\%\f3GL_RGB8\fP,
 
63
\%\f3GL_RGB10\fP,
 
64
\%\f3GL_RGB12\fP,
 
65
\%\f3GL_RGB16\fP,
 
66
\%\f3GL_RGBA\fP,
 
67
\%\f3GL_RGBA2\fP,
 
68
\%\f3GL_RGBA4\fP,
 
69
\%\f3GL_RGB5_A1\fP,
 
70
\%\f3GL_RGBA8\fP,
 
71
\%\f3GL_RGB10_A2\fP,
 
72
\%\f3GL_RGBA12\fP, or
 
73
\%\f3GL_RGBA16\fP.
 
74
.TP
 
75
\f2width\fP
 
76
The width of the pixel array referenced by \f2image\fP.
 
77
.TP
 
78
\f2height\fP
 
79
The height of the pixel array referenced by \f2image\fP.
 
80
.TP
 
81
\f2format\fP
 
82
The  of the pixel data in \f2image\fP.
 
83
The allowable values are
 
84
\%\f3GL_RED\fP,
 
85
\%\f3GL_GREEN\fP,
 
86
\%\f3GL_BLUE\fP,
 
87
\%\f3GL_ALPHA\fP,
 
88
\%\f3GL_RGB\fP,
 
89
\%\f3GL_BGR\fP,
 
90
\%\f3GL_RGBA\fP,
 
91
\%\f3GL_BGRA\fP,
 
92
\%\f3GL_LUMINANCE\fP, and
 
93
\%\f3GL_LUMINANCE_ALPHA\fP.
 
94
.TP
 
95
\f2type\fP
 
96
The type of the pixel data in \f2image\fP.
 
97
Symbolic constants
 
98
\%\f3GL_UNSIGNED_BYTE\fP,
 
99
\%\f3GL_BYTE\fP,
 
100
\%\f3GL_BITMAP\fP,
 
101
\%\f3GL_UNSIGNED_SHORT\fP,
 
102
\%\f3GL_SHORT\fP,
 
103
\%\f3GL_UNSIGNED_INT\fP,
 
104
\%\f3GL_INT\fP,
 
105
\%\f3GL_FLOAT\fP,
 
106
\%\f3GL_UNSIGNED_BYTE_3_3_2\fP,
 
107
\%\f3GL_UNSIGNED_BYTE_2_3_3_REV\fP,
 
108
\%\f3GL_UNSIGNED_SHORT_5_6_5\fP,
 
109
\%\f3GL_UNSIGNED_SHORT_5_6_5_REV\fP,
 
110
\%\f3GL_UNSIGNED_SHORT_4_4_4_4\fP,
 
111
\%\f3GL_UNSIGNED_SHORT_4_4_4_4_REV\fP,
 
112
\%\f3GL_UNSIGNED_SHORT_5_5_5_1\fP,
 
113
\%\f3GL_UNSIGNED_SHORT_1_5_5_5_REV\fP,
 
114
\%\f3GL_UNSIGNED_INT_8_8_8_8\fP,
 
115
\%\f3GL_UNSIGNED_INT_8_8_8_8_REV\fP,
 
116
\%\f3GL_UNSIGNED_INT_10_10_10_2\fP, and
 
117
\%\f3GL_UNSIGNED_INT_2_10_10_10_REV\fP
 
118
are accepted.
 
119
.TP
 
120
\f2image\fP
 
121
Pointer to a two-dimensional array of pixel data that is processed to
 
122
build the convolution filter kernel.
 
123
.SH DESCRIPTION
 
124
\%\f3glConvolutionFilter2D\fP builds a two-dimensional convolution filter kernel from an array of
 
125
pixels.
 
126
.sp
 
127
The pixel array specified by \f2width\fP, \f2height\fP, \f2format\fP, \f2type\fP, and
 
128
\f2image\fP is extracted from memory and processed just as if
 
129
\%\f3glDrawPixels\fP were called, but processing stops after the final
 
130
expansion to RGBA is completed.
 
131
.sp
 
132
The R, G, B, and A components of each pixel are next scaled by the four
 
133
2D \%\f3GL_CONVOLUTION_FILTER_SCALE\fP parameters and biased by the
 
134
four 2D \%\f3GL_CONVOLUTION_FILTER_BIAS\fP parameters.
 
135
(The scale and bias parameters are set by \%\f3glConvolutionParameter\fP
 
136
using the \%\f3GL_CONVOLUTION_2D\fP target and the names
 
137
\%\f3GL_CONVOLUTION_FILTER_SCALE\fP and \%\f3GL_CONVOLUTION_FILTER_BIAS\fP.
 
138
The parameters themselves are vectors of four values that are applied to red,
 
139
green, blue, and alpha, in that order.)
 
140
The R, G, B, and A values are not clamped to [0,1] at any time during this
 
141
process.
 
142
.sp
 
143
Each pixel is then converted to the internal  specified by
 
144
\f2internalformat\fP.
 
145
This conversion simply maps the component values of the pixel (R, G, B,
 
146
and A) to the values included in the internal  (red, green, blue,
 
147
alpha, luminance, and intensity).  The mapping is as follows:
 
148
.sp
 
149
.TS
 
150
center;
 
151
lb cb cb cb cb cb cb
 
152
l c c c c c c.
 
153
_
 
154
Internal Format Red     Green   Blue    Alpha   Luminance       Intensity
 
155
_
 
156
\%\f3GL_ALPHA\fP                                A
 
157
\%\f3GL_LUMINANCE\fP                            R
 
158
\%\f3GL_LUMINANCE_ALPHA\fP                      A       R
 
159
\%\f3GL_INTENSITY\fP                                            R
 
160
\%\f3GL_RGB\fP  R       G       B
 
161
\%\f3GL_RGBA\fP R       G       B       A
 
162
_
 
163
.TE
 
164
.sp
 
165
The red, green, blue, alpha, luminance, and/or intensity components of
 
166
the resulting pixels are stored in floating-point rather than integer
 
167
.
 
168
They form a two-dimensional filter kernel image indexed with coordinates
 
169
\f2i\fP and \f2j\fP such that \f2i\fP starts at zero and increases from left
 
170
to right, and \f2j\fP starts at zero and increases from bottom to top.
 
171
Kernel location \f2i,j\fP is derived from the \f2N\fPth pixel,
 
172
where \f2N\fP is \f2i\fP+\f2j\fP*\f2width\fP.
 
173
.PP
 
174
Note that after a convolution is performed, the resulting color
 
175
components are also scaled by their corresponding
 
176
\%\f3GL_POST_CONVOLUTION_c_SCALE\fP parameters and biased by their
 
177
corresponding \%\f3GL_POST_CONVOLUTION_c_BIAS\fP parameters (where
 
178
\f2c\fP takes on the values \f3RED\fP, \f3GREEN\fP, \f3BLUE\fP, and
 
179
\f3ALPHA\fP).
 
180
These parameters are set by \%\f3glPixelTransfer\fP.
 
181
.SH NOTES
 
182
\%\f3glConvolutionFilter2D\fP is present only if \%\f3GL_ARB_imaging\fP is returned when \%\f3glGetString\fP
 
183
is called with an argument of \%\f3GL_EXTENSIONS\fP.
 
184
.SH ERRORS
 
185
\%\f3GL_INVALID_ENUM\fP is generated if \f2target\fP is not
 
186
\%\f3GL_CONVOLUTION_2D\fP.
 
187
.P
 
188
\%\f3GL_INVALID_ENUM\fP is generated if \f2internalformat\fP is not one of the
 
189
allowable values.
 
190
.P
 
191
\%\f3GL_INVALID_VALUE\fP is generated if \f2width\fP is less than zero or greater
 
192
than the maximum supported value.
 
193
This value may be queried with \%\f3glGetConvolutionParameter\fP
 
194
using target \%\f3GL_CONVOLUTION_2D\fP and name
 
195
\%\f3GL_MAX_CONVOLUTION_WIDTH\fP.
 
196
.P
 
197
\%\f3GL_INVALID_VALUE\fP is generated if \f2height\fP is less than zero or greater
 
198
than the maximum supported value.
 
199
This value may be queried with \%\f3glGetConvolutionParameter\fP
 
200
using target \%\f3GL_CONVOLUTION_2D\fP and name
 
201
\%\f3GL_MAX_CONVOLUTION_HEIGHT\fP.
 
202
.P
 
203
\%\f3GL_INVALID_ENUM\fP is generated if \f2format\fP is not one of the allowable
 
204
values.
 
205
.P
 
206
\%\f3GL_INVALID_ENUM\fP is generated if \f2type\fP is not one of the allowable
 
207
values.
 
208
.P
 
209
\%\f3GL_INVALID_OPERATION\fP is generated if \%\f3glConvolutionFilter2D\fP is executed
 
210
between the execution of \%\f3glBegin\fP and the corresponding
 
211
execution of \%\f3glEnd\fP.
 
212
.P
 
213
\%\f3GL_INVALID_OPERATION\fP is generated if \f2height\fP is one of
 
214
\%\f3GL_UNSIGNED_BYTE_3_3_2\fP,
 
215
\%\f3GL_UNSIGNED_BYTE_2_3_3_REV\fP,
 
216
\%\f3GL_UNSIGNED_SHORT_5_6_5\fP, or
 
217
\%\f3GL_UNSIGNED_SHORT_5_6_5_REV\fP
 
218
and \f2format\fP is not \%\f3GL_RGB\fP.
 
219
.P
 
220
\%\f3GL_INVALID_OPERATION\fP is generated if \f2height\fP is one of
 
221
\%\f3GL_UNSIGNED_SHORT_4_4_4_4\fP,
 
222
\%\f3GL_UNSIGNED_SHORT_4_4_4_4_REV\fP,
 
223
\%\f3GL_UNSIGNED_SHORT_5_5_5_1\fP,
 
224
\%\f3GL_UNSIGNED_SHORT_1_5_5_5_REV\fP,
 
225
\%\f3GL_UNSIGNED_INT_8_8_8_8\fP,
 
226
\%\f3GL_UNSIGNED_INT_8_8_8_8_REV\fP,
 
227
\%\f3GL_UNSIGNED_INT_10_10_10_2\fP, or
 
228
\%\f3GL_UNSIGNED_INT_2_10_10_10_REV\fP
 
229
and \f2format\fP is neither \%\f3GL_RGBA\fP nor \%\f3GL_BGRA\fP.
 
230
.SH ASSOCIATED GETS
 
231
\%\f3glGetConvolutionParameter\fP, \%\f3glGetConvolutionFilter\fP
 
232
.SH SEE ALSO
 
233
\%\f3glConvolutionFilter1D(3G)\fP,
 
234
\%\f3glSeparableFilter2D(3G)\fP,
 
235
\%\f3glConvolutionParameter(3G)\fP,
 
236
\%\f3glPixelTransfer(3G)\fP