File: glConvolutionParameter.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 (105 lines) | stat: -rw-r--r-- 12,972 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
<?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>glConvolutionParameter</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="glConvolutionFilter2D.3G.xml" title="glConvolutionFilter2D"/><link rel="next" href="glCopyColorSubTable.3G.xml" title="glCopyColorSubTable"/></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">glConvolutionParameter</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="glConvolutionFilter2D.3G.xml">Prev</a></td><th width="60%" align="center">GL</th><td width="20%" align="right"><a accesskey="n" href="glCopyColorSubTable.3G.xml">Next</a></td></tr></table><hr/></div><div class="refentry" lang="en"><a name="glConvolutionParameter.3G"/><div class="titlepage"/><div class="refnamediv"><a name="glConvolutionParameter.3G-name"/><h2>Name</h2><p>glConvolutionParameterf, glConvolutionParameteri, glConvolutionParameterfv, glConvolutionParameteriv &#8212; set convolution parameters</p></div><div class="refsynopsisdiv"><a name="glConvolutionParameter.3G-c_spec"/><h2>C Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code>void<tt>glConvolutionParameterf</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLenum<i><tt>target</tt></i>, GLenum<i><tt>pname</tt></i>, GLfloat<i><tt>params</tt></i>);</code></td></tr><tr><td valign="top"><code>void<tt>glConvolutionParameteri</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLenum<i><tt>target</tt></i>, GLenum<i><tt>pname</tt></i>, GLint<i><tt>params</tt></i>);</code></td></tr></table></div><div class="refsynopsisdiv"><a name="glConvolutionParameter.3G-python_spec"/><h2>Python Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code><tt>glConvolutionParameterf</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>target</tt></i>, <i><tt>pname</tt></i>, <i><tt>params</tt></i>) &#8594;<tt>None</tt></code></td></tr><tr><td valign="top"><code><tt>glConvolutionParameteri</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>target</tt></i>, <i><tt>pname</tt></i>, <i><tt>params</tt></i>) &#8594;<tt>None</tt></code></td></tr></table></div><div class="refsect1" lang="en"><a name="glConvolutionParameter.3G-parameters"/><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><i><tt>target</tt></i></span></dt><dd>
						The target for the convolution parameter. Must be one of <tt>GL_CONVOLUTION_1D</tt>,
						<tt>GL_CONVOLUTION_2D</tt>, or <tt>GL_SEPARABLE_2D</tt>.
					</dd><dt><span class="term"><i><tt>pname</tt></i></span></dt><dd>
						The parameter to be set. Must be <tt>GL_CONVOLUTION_BORDER_MODE</tt>.
					</dd><dt><span class="term"><i><tt>params</tt></i></span></dt><dd>
						The parameter value. Must be one of <tt>GL_REDUCE</tt>,
						<tt>GL_CONSTANT_BORDER</tt>, <tt>GL_REPLICATE_BORDER</tt>.
					</dd></dl></div></div><div class="refsynopsisdiv"><a name="glConvolutionParameter.3G-c_spec-v"/><h2>C Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code>void<tt>glConvolutionParameterfv</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLenum<i><tt>target</tt></i>, GLenum<i><tt>pname</tt></i>, constGLfloat*<i><tt>params</tt></i>);</code></td></tr><tr><td valign="top"><code>void<tt>glConvolutionParameteriv</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLenum<i><tt>target</tt></i>, GLenum<i><tt>pname</tt></i>, constGLint*<i><tt>params</tt></i>);</code></td></tr></table></div><div class="refsynopsisdiv"><a name="glConvolutionParameter.3G-python_spec-v"/><h2>Python Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code><tt>glConvolutionParameterfv</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>target</tt></i>, <i><tt>pname</tt></i>, <i><tt>params</tt></i>) &#8594;<tt>None</tt></code></td></tr><tr><td valign="top"><code><tt>glConvolutionParameteriv</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>target</tt></i>, <i><tt>pname</tt></i>, <i><tt>params</tt></i>) &#8594;<tt>None</tt></code></td></tr></table></div><div class="refsect1" lang="en"><a name="glConvolutionParameter.3G-parameters-v"/><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><i><tt>target</tt></i></span></dt><dd>
						The target for the convolution parameter. Must be one of <tt>GL_CONVOLUTION_1D</tt>,
						<tt>GL_CONVOLUTION_2D</tt>, or <tt>GL_SEPARABLE_2D</tt>.
					</dd><dt><span class="term"><i><tt>pname</tt></i></span></dt><dd>
						The parameter to be set. Must be one of <tt>GL_CONVOLUTION_BORDER_MODE</tt>,
						<tt>GL_CONVOLUTION_BORDER_COLOR</tt>, <tt>GL_CONVOLUTION_FILTER_SCALE</tt>, or
						<tt>GL_CONVOLUTION_FILTER_BIAS</tt>.
					</dd><dt><span class="term"><i><tt>params</tt></i></span></dt><dd>
						The parameter value. If <i><tt>pname</tt></i> is <tt>GL_CONVOLUTION_BORDER_MODE</tt>,
						<i><tt>params</tt></i> must be one of <tt>GL_REDUCE</tt>,
						<tt>GL_CONSTANT_BORDER</tt>, or <tt>GL_REPLICATE_BORDER</tt>. Otherwise, must be a
						vector of four values (for red, green, blue, and alpha, respectively) to be used for scaling (when
						<i><tt>pname</tt></i> is <tt>GL_CONVOLUTION_FILTER_SCALE</tt>), or biasing (when
						<i><tt>pname</tt></i> is <tt>GL_CONVOLUTION_FILTER_BIAS</tt>) a convolution filter
						kernel or setting the constant border color (when <i><tt>pname</tt></i> is
						<tt>GL_CONVOLUTION_BORDER_COLOR</tt>.
					</dd></dl></div></div><div class="refsect1" lang="en"><a name="glConvolutionParameter.3G-description"/><h2>Description</h2><p>
			<tt>glConvolutionParameter</tt> sets the value of a convolution parameter.
			<i><tt>target</tt></i> selects the convolution filter to be affected: <tt>GL_CONVOLUTION_1D</tt>,
			<tt>GL_CONVOLUTION_2D</tt>, or <tt>GL_SEPARABLE_2D</tt> for the 1D, 2D, or separable 2D filter,
			respectively. <i><tt>pname</tt></i> selects the parameter to be changed.
			<tt>GL_CONVOLUTION_FILTER_SCALE</tt> and <tt>GL_CONVOLUTION_FILTER_BIAS</tt> affect the
			definition of the convolution filter kernel; see <a href="glConvolutionFilter1D.3G.xml">glConvolutionFilter1D</a>, <a href="glConvolutionFilter2D.3G.xml"><tt>glConvolutionFilter2D</tt></a>, and <a href="glSeparableFilter2D.3G.xml"><tt>glSeparableFilter2D</tt></a> for details. In these cases, <i><tt>params</tt></i> is an
			array of four values to be applied to red, green, blue, and alpha values, respectively. The initial value for
			<tt>GL_CONVOLUTION_FILTER_SCALE</tt> is (1, 1, 1, 1), and the initial value for
			<tt>GL_CONVOLUTION_FILTER_BIAS</tt> is (0, 0, 0, 0). A <i><tt>pname</tt></i> value of
			<tt>GL_CONVOLUTION_BORDER_MODE</tt> controls the convolution border mode. The accepted modes are:
		</p><div class="variablelist"><dl><dt><span class="term"><tt>GL_REDUCE</tt></span></dt><dd>
						The image resulting from convolution is smaller than the source image. If the filter width is
						<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>Wf</mml:mi>
							</mml:math> and height is <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>Hf</mml:mi>
							</mml:math>, and the source image width is <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>Ws</mml:mi>
							</mml:math> and height is <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>Hs</mml:mi>
							</mml:math>, then the convolved image width will be <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>Ws</mml:mi>
								<mml:mo>-</mml:mo>
								<mml:mi>Wf</mml:mi>
								<mml:mo>+</mml:mo>
								<mml:mn>1</mml:mn>
							</mml:math> and height will be <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>Hs</mml:mi>
								<mml:mo>-</mml:mo>
								<mml:mi>Hf</mml:mi>
								<mml:mo>+</mml:mo>
								<mml:mn>1</mml:mn>
							</mml:math>. (If this reduction would generate an image with zero or negative width and/or height,
						the output is simply <tt>NULL</tt>, with no error generated.) The coordinates of the image
						resulting from convolution are zero through <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>Ws</mml:mi>
								<mml:mo>-</mml:mo>
								<mml:mi>Wf</mml:mi>
							</mml:math> in width and zero through <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
								<mml:mi>Hs</mml:mi>
								<mml:mo>-</mml:mo>
								<mml:mi>Hf</mml:mi>
							</mml:math> in height.
					</dd><dt><span class="term"><tt>GL_CONSTANT_BORDER</tt></span></dt><dd>
						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
						<tt>GL_CONVOLUTION_BORDER_COLOR</tt>.
					</dd><dt><span class="term"><tt>GL_REPLICATE_BORDER</tt></span></dt><dd>
						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.
					</dd></dl></div></div><div class="refsect1" lang="en"><a name="glConvolutionParameter.3G-notes"/><h2>Notes</h2><p>
			<tt>glConvolutionParameter</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><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, <a href="glTexImage1D.3G.xml"><tt>glTexImage1D</tt></a> requires power-of-two image size. When <tt>GL_REDUCE</tt>
			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.
		</p></div><div class="refsect1" lang="en"><a name="glConvolutionParameter.3G-errors"/><h2>Errors</h2><p>
			<tt>GL_INVALID_ENUM</tt> is generated if <i><tt>target</tt></i> is not one of the allowable values.
		</p><p>
			<tt>GL_INVALID_ENUM</tt> is generated if <i><tt>pname</tt></i> is not one of the allowable values.
		</p><p>
			<tt>GL_INVALID_ENUM</tt> is generated if <i><tt>pname</tt></i> is
			<tt>GL_CONVOLUTION_BORDER_MODE</tt> and <i><tt>params</tt></i> is not one of
			<tt>GL_REDUCE</tt>, <tt>GL_CONSTANT_BORDER</tt>, or <tt>GL_REPLICATE_BORDER</tt>.
		</p><p>
			<tt>GL_INVALID_OPERATION</tt> is generated if <tt>glConvolutionParameter</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></div><div class="refsect1" lang="en"><a name="glConvolutionParameter.3G-associated_gets"/><h2>Associated Gets</h2><p>
			<tt>glGetConvolutionParameter</tt>
		</p></div><div class="refsect1" lang="en"><a name="glConvolutionParameter.3G-see_also"/><h2>See Also</h2><p>
			<span class="simplelist"><a href="glConvolutionFilter1D.3G.xml">glConvolutionFilter1D</a>, <a href="glConvolutionFilter2D.3G.xml">glConvolutionFilter2D</a>, <a href="glSeparableFilter2D.3G.xml">glSeparableFilter2D</a>, <a href="glGetConvolutionParameter.3G.xml">glGetConvolutionParameter</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="glConvolutionFilter2D.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="glCopyColorSubTable.3G.xml">Next</a></td></tr><tr><td width="40%" align="left" valign="top">glConvolutionFilter2D</td><td width="20%" align="center"><a accesskey="h" href="index.xml">Home</a></td><td width="40%" align="right" valign="top">glCopyColorSubTable</td></tr></table></div></body></html>