File: glConvolutionFilter1D.3G.xml

package info (click to toggle)
pyopengl 2.0.1.08-5.1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 19,484 kB
  • ctags: 9,036
  • sloc: pascal: 64,950; xml: 28,088; ansic: 20,696; python: 19,761; tcl: 668; makefile: 240; sh: 25
file content (106 lines) | stat: -rw-r--r-- 13,132 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd">
<html
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:mml="http://www.w3.org/1998/Math/MathML"
><head><title>glConvolutionFilter1D</title><link rel="stylesheet" href="style.css" type="text/css"/><meta name="generator" content="DocBook XSL Stylesheets V1.59.1"/><link rel="home" href="index.xml" title="PyOpenGL 2.0.1.07 Man Pages"/><link rel="up" href="reference-GL.xml" title="GL"/><link rel="previous" href="glColorTableParameter.3G.xml" title="glColorTableParameter"/><link rel="next" href="glConvolutionFilter2D.3G.xml" title="glConvolutionFilter2D"/></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">glConvolutionFilter1D</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="glColorTableParameter.3G.xml">Prev</a></td><th width="60%" align="center">GL</th><td width="20%" align="right"><a accesskey="n" href="glConvolutionFilter2D.3G.xml">Next</a></td></tr></table><hr/></div><div class="refentry" lang="en"><a name="glConvolutionFilter1D.3G"/><div class="titlepage"/><div class="refnamediv"><a name="glConvolutionFilter1D.3G-name"/><h2>Name</h2><p>glConvolutionFilter1D &#8212; define a one-dimensional convolution filter</p></div><div class="refsynopsisdiv"><a name="glConvolutionFilter1D.3G-c_spec"/><h2>C Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code>void<tt>glConvolutionFilter1D</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLenum<i><tt>target</tt></i>, GLenum<i><tt>internalformat</tt></i>, GLsizei<i><tt>width</tt></i>, GLenum<i><tt>format</tt></i>, GLenum<i><tt>type</tt></i>, constGLvoid*<i><tt>image</tt></i>);</code></td></tr></table></div><div class="refsynopsisdiv"><a name="glConvolutionFilter1D.3G-python_spec"/><h2>Python Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code><tt>glConvolutionFilter1D</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>target</tt></i>, <i><tt>internalformat</tt></i>, <i><tt>width</tt></i>, <i><tt>format</tt></i>, <i><tt>type</tt></i>, <i><tt>image</tt></i>) &#8594;<tt>None</tt></code></td></tr></table></div><div class="refsect1" lang="en"><a name="glConvolutionFilter1D.3G-parameters"/><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><i><tt>target</tt></i></span></dt><dd>
						Must be <tt>GL_CONVOLUTION_1D</tt>.
					</dd><dt><span class="term"><i><tt>internalformat</tt></i></span></dt><dd>
						The internal of the convolution filter kernel. The allowable values are <tt>GL_ALPHA</tt>,
						<tt>GL_LUMINANCE</tt>, <tt>GL_LUMINANCE_ALPHA</tt>,
						<tt>GL_INTENSITY</tt>, <tt>GL_RGB</tt>, and <tt>GL_RGBA</tt>.
					</dd><dt><span class="term"><i><tt>width</tt></i></span></dt><dd>
						The width of the pixel array referenced by <i><tt>image</tt></i>.
					</dd><dt><span class="term"><i><tt>format</tt></i></span></dt><dd>
						The of the pixel data in <i><tt>image</tt></i>. The allowable values are
						<tt>GL_ALPHA</tt>, <tt>GL_ALPHA4</tt>, <tt>GL_ALPHA8</tt>,
						<tt>GL_ALPHA12</tt>, <tt>GL_ALPHA16</tt>, <tt>GL_LUMINANCE</tt>,
						<tt>GL_LUMINANCE4</tt>, <tt>GL_LUMINANCE8</tt>,
						<tt>GL_LUMINANCE12</tt>, <tt>GL_LUMINANCE16</tt>,
						<tt>GL_LUMINANCE_ALPHA</tt>, <tt>GL_LUMINANCE4_ALPHA4</tt>,
						<tt>GL_LUMINANCE6_ALPHA2</tt>, <tt>GL_LUMINANCE8_ALPHA8</tt>,
						<tt>GL_LUMINANCE12_ALPHA4</tt>, <tt>GL_LUMINANCE12_ALPHA12</tt>,
						<tt>GL_LUMINANCE16_ALPHA16</tt>, <tt>GL_INTENSITY</tt>,
						<tt>GL_INTENSITY4</tt>, <tt>GL_INTENSITY8</tt>,
						<tt>GL_INTENSITY12</tt>, <tt>GL_INTENSITY16</tt>, <tt>GL_R3_G3_B2</tt>,
						<tt>GL_RGB</tt>, <tt>GL_RGB4</tt>, <tt>GL_RGB5</tt>,
						<tt>GL_RGB8</tt>, <tt>GL_RGB10</tt>, <tt>GL_RGB12</tt>,
						<tt>GL_RGB16</tt>, <tt>GL_RGBA</tt>, <tt>GL_RGBA2</tt>,
						<tt>GL_RGBA4</tt>, <tt>GL_RGB5_A1</tt>, <tt>GL_RGBA8</tt>,
						<tt>GL_RGB10_A2</tt>, <tt>GL_RGBA12</tt>, or <tt>GL_RGBA16</tt>.
					</dd><dt><span class="term"><i><tt>type</tt></i></span></dt><dd>
						The type of the pixel data in <i><tt>image</tt></i>. Symbolic constants
						<tt>GL_UNSIGNED_BYTE</tt>, <tt>GL_BYTE</tt>, <tt>GL_BITMAP</tt>,
						<tt>GL_UNSIGNED_SHORT</tt>, <tt>GL_SHORT</tt>,
						<tt>GL_UNSIGNED_INT</tt>, <tt>GL_INT</tt>, <tt>GL_FLOAT</tt>,
						<tt>GL_UNSIGNED_BYTE_3_3_2</tt>, <tt>GL_UNSIGNED_BYTE_2_3_3_REV</tt>,
						<tt>GL_UNSIGNED_SHORT_5_6_5</tt>, <tt>GL_UNSIGNED_SHORT_5_6_5_REV</tt>,
						<tt>GL_UNSIGNED_SHORT_4_4_4_4</tt>, <tt>GL_UNSIGNED_SHORT_4_4_4_4_REV</tt>,
						<tt>GL_UNSIGNED_SHORT_5_5_5_1</tt>, <tt>GL_UNSIGNED_SHORT_1_5_5_5_REV</tt>,
						<tt>GL_UNSIGNED_INT_8_8_8_8</tt>, <tt>GL_UNSIGNED_INT_8_8_8_8_REV</tt>,
						<tt>GL_UNSIGNED_INT_10_10_10_2</tt>, and <tt>GL_UNSIGNED_INT_2_10_10_10_REV</tt>
						are accepted.
					</dd><dt><span class="term"><i><tt>image</tt></i></span></dt><dd>
						Pointer to a one-dimensional array of pixel data that is processed to build the convolution filter kernel.
					</dd></dl></div></div><div class="refsect1" lang="en"><a name="glConvolutionFilter1D.3G-description"/><h2>Description</h2><p>
			<tt>glConvolutionFilter1D</tt> builds a one-dimensional convolution filter kernel from an array of pixels.
			The pixel array specified by <i><tt>width</tt></i>, <i><tt>format</tt></i>, <i><tt>type</tt></i>,
			and <i><tt>image</tt></i> is extracted from memory and processed just as if <a href="glDrawPixels.3G.xml"><tt>glDrawPixels</tt></a> were called, but processing stops after the final expansion to RGBA is
			completed. The R, G, B, and A components of each pixel are next scaled by the four 1D
			<tt>GL_CONVOLUTION_FILTER_SCALE</tt> parameters and biased by the four 1D
			<tt>GL_CONVOLUTION_FILTER_BIAS</tt> parameters. (The scale and bias parameters are set by <tt>glConvolutionParameter</tt> using the <tt>GL_CONVOLUTION_1D</tt> target and the
			names <tt>GL_CONVOLUTION_FILTER_SCALE</tt> and <tt>GL_CONVOLUTION_FILTER_BIAS</tt>. The
			parameters themselves are vectors of four values that are applied to red, green, blue, and alpha, in that order.) The
			R, G, B, and A values are not clamped to [0,1] at any time during this process. Each pixel is then converted to the
			internal specified by <i><tt>internalformat</tt></i>. This conversion simply maps the component values of the
			pixel (R, G, B, and A) to the values included in the internal (red, green, blue, alpha, luminance, and intensity). The
			mapping is as follows:
		</p><div class="informaltable"><table border="1"><colgroup><col/><col align="center"/><col align="center"/><col align="center"/><col align="center"/><col align="center"/><col align="center"/></colgroup><thead><tr><th><span class="bold"><b>Internal Format</b></span></th><th align="center"><span class="bold"><b>Red</b></span></th><th align="center"><span class="bold"><b>Green</b></span></th><th align="center"><span class="bold"><b>Blue</b></span></th><th align="center"><span class="bold"><b>Alpha</b></span></th><th align="center"><span class="bold"><b>Luminance</b></span></th><th align="center"><span class="bold"><b>Intensity</b></span></th></tr></thead><tbody><tr><td><tt>GL_ALPHA</tt></td><td align="center"></td><td align="center"></td><td align="center"></td><td align="center">A</td><td align="center"></td><td align="center"></td></tr><tr><td><tt>GL_LUMINANCE</tt></td><td align="center"></td><td align="center"></td><td align="center"></td><td align="center">R</td><td align="center"></td><td align="center"></td></tr><tr><td><tt>GL_LUMINANCE_ALPHA</tt></td><td align="center"></td><td align="center"></td><td align="center">A</td><td align="center">R</td><td align="center"></td><td align="center"></td></tr><tr><td><tt>GL_INTENSITY</tt></td><td align="center"></td><td align="center"></td><td align="center"></td><td align="center"></td><td align="center"></td><td align="center">R</td></tr><tr><td><tt>GL_RGB</tt></td><td align="center">R</td><td align="center">G</td><td align="center">B</td><td align="center"></td><td align="center"></td><td align="center"></td></tr><tr><td><tt>GL_RGBA</tt></td><td align="center">R</td><td align="center">G</td><td align="center">B</td><td align="center">A</td><td align="center"></td><td align="center"></td></tr></tbody></table></div><p>
			The red, green, blue, alpha, luminance, and/or intensity components of the resulting pixels are stored in
			floating-point rather than integer They form a one-dimensional filter kernel image indexed with coordinate
			<i><tt>i</tt></i> such that <i><tt>i</tt></i> starts at 0 and increases from left to right. Kernel
			location <i><tt>i</tt></i> is derived from the <i><tt>i</tt></i>th pixel, counting from 0.
		</p><p>
			Note that after a convolution is performed, the resulting color components are also scaled by their corresponding
			<tt>GL_POST_CONVOLUTION_c_SCALE</tt> parameters and biased by their corresponding
			<tt>GL_POST_CONVOLUTION_c_BIAS</tt> parameters (where <i><tt>c</tt></i> takes on the values
			<span class="bold"><b>RED</b></span>, <span class="bold"><b>GREEN</b></span>, <span class="bold"><b>BLUE</b></span>,
			and <span class="bold"><b>ALPHA</b></span>). These parameters are set by <tt>glPixelTransfer</tt>.
		</p></div><div class="refsect1" lang="en"><a name="glConvolutionFilter1D.3G-notes"/><h2>Notes</h2><p>
			<tt>glConvolutionFilter1D</tt> is present only if <tt>GL_ARB_imaging</tt> is returned when
			<a href="glGetString.3G.xml"><tt>glGetString</tt></a> is called with an argument of <tt>GL_EXTENSIONS</tt>.
		</p></div><div class="refsect1" lang="en"><a name="glConvolutionFilter1D.3G-errors"/><h2>Errors</h2><p>
			<tt>GL_INVALID_ENUM</tt> is generated if <i><tt>target</tt></i> is not
			<tt>GL_CONVOLUTION_1D</tt>.
		</p><p>
			<tt>GL_INVALID_ENUM</tt> is generated if <i><tt>internalformat</tt></i> is not one of the allowable
			values.
		</p><p>
			<tt>GL_INVALID_VALUE</tt> is generated if <i><tt>width</tt></i> is less than zero or greater than
			the maximum supported value. This value may be queried with <tt>glGetConvolutionParameter</tt> using target <tt>GL_CONVOLUTION_1D</tt> and name
			<tt>GL_MAX_CONVOLUTION_WIDTH</tt>.
		</p><p>
			<tt>GL_INVALID_ENUM</tt> is generated if <i><tt>format</tt></i> is not one of the allowable values.
		</p><p>
			<tt>GL_INVALID_ENUM</tt> is generated if <i><tt>type</tt></i> is not one of the allowable values.
		</p><p>
			<tt>GL_INVALID_OPERATION</tt> is generated if <tt>glConvolutionFilter1D</tt> is executed
			between the execution of <a href="glBegin.3G.xml"><tt>glBegin</tt></a> and the corresponding execution of <a href="glBegin.3G.xml"><tt>glEnd</tt></a>.
		</p><p>
			<tt>GL_INVALID_OPERATION</tt> is generated if <i><tt>format</tt></i> is one of
			<tt>GL_UNSIGNED_BYTE_3_3_2</tt>, <tt>GL_UNSIGNED_BYTE_2_3_3_REV</tt>,
			<tt>GL_UNSIGNED_SHORT_5_6_5</tt>, or <tt>GL_UNSIGNED_SHORT_5_6_5_REV</tt> and
			<i><tt>type</tt></i> is not <tt>GL_RGB</tt>.
		</p><p>
			<tt>GL_INVALID_OPERATION</tt> is generated if <i><tt>format</tt></i> is one of
			<tt>GL_UNSIGNED_SHORT_4_4_4_4</tt>, <tt>GL_UNSIGNED_SHORT_4_4_4_4_REV</tt>,
			<tt>GL_UNSIGNED_SHORT_5_5_5_1</tt>, <tt>GL_UNSIGNED_SHORT_1_5_5_5_REV</tt>,
			<tt>GL_UNSIGNED_INT_8_8_8_8</tt>, <tt>GL_UNSIGNED_INT_8_8_8_8_REV</tt>,
			<tt>GL_UNSIGNED_INT_10_10_10_2</tt>, or <tt>GL_UNSIGNED_INT_2_10_10_10_REV</tt> and
			<i><tt>type</tt></i> is neither <tt>GL_RGBA</tt> nor <tt>GL_BGRA</tt>.
		</p></div><div class="refsect1" lang="en"><a name="glConvolutionFilter1D.3G-associated_gets"/><h2>Associated Gets</h2><p>
			<tt>glGetConvolutionParameter</tt>, <a href="glGetConvolutionFilter.3G.xml"><tt>glGetConvolutionFilter</tt></a>
		</p></div><div class="refsect1" lang="en"><a name="glConvolutionFilter1D.3G-see_also"/><h2>See Also</h2><p>
			<span class="simplelist"><a href="glConvolutionFilter2D.3G.xml">glConvolutionFilter2D</a>, <a href="glSeparableFilter2D.3G.xml">glSeparableFilter2D</a>, <a href="glConvolutionParameter.3G.xml">glConvolutionParameter</a>, <a href="glPixelTransfer.3G.xml">glPixelTransfer</a></span>
		</p></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="glColorTableParameter.3G.xml">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="reference-GL.xml">Up</a></td><td width="40%" align="right"><a accesskey="n" href="glConvolutionFilter2D.3G.xml">Next</a></td></tr><tr><td width="40%" align="left" valign="top">glColorTableParameter</td><td width="20%" align="center"><a accesskey="h" href="index.xml">Home</a></td><td width="40%" align="right" valign="top">glConvolutionFilter2D</td></tr></table></div></body></html>