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 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
|
<?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>glCopyTexImage1D</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="glCopyPixels.3G.xml" title="glCopyPixels"/><link rel="next" href="glCopyTexImage2D.3G.xml" title="glCopyTexImage2D"/></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">glCopyTexImage1D</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="glCopyPixels.3G.xml">Prev</a></td><th width="60%" align="center">GL</th><td width="20%" align="right"><a accesskey="n" href="glCopyTexImage2D.3G.xml">Next</a></td></tr></table><hr/></div><div class="refentry" lang="en"><a name="glCopyTexImage1D.3G"/><div class="titlepage"/><div class="refnamediv"><a name="glCopyTexImage1D.3G-name"/><h2>Name</h2><p>glCopyTexImage1D — copy pixels into a 1D texture image</p></div><div class="refsynopsisdiv"><a name="glCopyTexImage1D.3G-c_spec"/><h2>C Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code>void<tt>glCopyTexImage1D</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLenum<i><tt>target</tt></i>, GLint<i><tt>level</tt></i>, GLenum<i><tt>internalformat</tt></i>, GLint<i><tt>x</tt></i>, GLint<i><tt>y</tt></i>, GLsizei<i><tt>width</tt></i>, GLint<i><tt>border</tt></i>);</code></td></tr></table></div><div class="refsynopsisdiv"><a name="glCopyTexImage1D.3G-python_spec"/><h2>Python Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code><tt>glCopyTexImage1D</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>target</tt></i>, <i><tt>level</tt></i>, <i><tt>internalformat</tt></i>, <i><tt>x</tt></i>, <i><tt>y</tt></i>, <i><tt>width</tt></i>, <i><tt>border</tt></i>) →<tt>None</tt></code></td></tr></table></div><div class="refsect1" lang="en"><a name="glCopyTexImage1D.3G-parameters"/><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><i><tt>target</tt></i></span></dt><dd>
Specifies the target texture. Must be <tt>GL_TEXTURE_1D</tt>.
</dd><dt><span class="term"><i><tt>level</tt></i></span></dt><dd>
Specifies the level-of-detail number. Level 0 is the base image level. Level <i><tt>n</tt></i> is
the <i><tt>n</tt></i>th mipmap reduction image.
</dd><dt><span class="term"><i><tt>internalformat</tt></i></span></dt><dd>
Specifies the internal of the texture. Must be one of the following symbolic constants:
<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_RGB</tt>,
<tt>GL_R3_G3_B2</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>x</tt></i>, <i><tt>y</tt></i></span></dt><dd>
Specify the window coordinates of the left corner of the row of pixels to be copied.
</dd><dt><span class="term"><i><tt>width</tt></i></span></dt><dd>
Specifies the width of the texture image. Must be 0 or <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
<mml:msup>
<mml:mn>2</mml:mn>
<mml:mi>n</mml:mi>
</mml:msup>
<mml:mo>+</mml:mo>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mo></mml:mo>
<mml:mi>border</mml:mi>
</mml:mrow>
</mml:math> for some integer <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
<mml:mi>n</mml:mi>
</mml:math>. The height of the texture image is 1.
</dd><dt><span class="term"><i><tt>border</tt></i></span></dt><dd>
Specifies the width of the border. Must be either 0 or 1.
</dd></dl></div></div><div class="refsect1" lang="en"><a name="glCopyTexImage1D.3G-description"/><h2>Description</h2><p>
<tt>glCopyTexImage1D</tt> defines a one-dimensional texture image with pixels from the current
<tt>GL_READ_BUFFER</tt>.
</p><p>
The screen-aligned pixel row with left corner at <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
<mml:mfenced separator=",">
<mml:mi>x</mml:mi>
<mml:mi>y</mml:mi>
</mml:mfenced>
</mml:math> and with a length of <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
<mml:mi>width</mml:mi>
<mml:mo>+</mml:mo>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mo></mml:mo>
<mml:mi>border</mml:mi>
</mml:mrow>
</mml:math> defines the texture array at the mipmap level specified by <i><tt>level</tt></i>.
<i><tt>internalformat</tt></i> specifies the internal of the texture array.
</p><p>
The pixels in the row are processed exactly as if <a href="glCopyPixels.3G.xml"><tt>glCopyPixels</tt></a> had been
called, but the process stops just before final conversion. At this point all pixel component values are clamped to the
range [0,1] and then converted to the texture's internal for storage in the texel array.
</p><p>
Pixel ordering is such that lower <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
<mml:mi>x</mml:mi>
</mml:math> screen coordinates correspond to lower texture coordinates.
</p><p>
If any of the pixels within the specified row of the current <tt>GL_READ_BUFFER</tt> are outside the window
associated with the current rendering context, then the values obtained for those pixels are undefined.
</p></div><div class="refsect1" lang="en"><a name="glCopyTexImage1D.3G-notes"/><h2>Notes</h2><p>
<tt>glCopyTexImage1D</tt> is available only if the GL version is 1.1 or greater.
</p><p>
Texturing has no effect in color index mode.
</p><p>
1, 2, 3, and 4 are not accepted values for <i><tt>internalformat</tt></i>.
</p><p>
An image with 0 width indicates a <tt>NULL</tt> texture.
</p><p>
When the <tt>GL_ARB_imaging</tt> extension is supported, the RGBA components copied from the framebuffer
may be processed by the imaging pipeline. See <a href="glTexImage1D.3G.xml"><tt>glTexImage1D</tt></a> for specific
details.
</p></div><div class="refsect1" lang="en"><a name="glCopyTexImage1D.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_VALUE</tt> is generated if <i><tt>level</tt></i> is less than 0.
</p><p>
<tt>GL_INVALID_VALUE</tt> may be generated if <i><tt>level</tt></i> is greater than <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
<mml:msub>
<mml:mo>log</mml:mo>
<mml:mn>2</mml:mn>
</mml:msub>
<mml:mi>max</mml:mi>
</mml:math>, where <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
<mml:mi>max</mml:mi>
</mml:math> is the returned value of <tt>GL_MAX_TEXTURE_SIZE</tt>.
</p><p>
<tt>GL_INVALID_VALUE</tt> is generated if <i><tt>internalformat</tt></i> is not an allowable value.
</p><p>
<tt>GL_INVALID_VALUE</tt> is generated if <i><tt>width</tt></i> is less than 0 or greater than
2 + <tt>GL_MAX_TEXTURE_SIZE</tt>, or if it cannot be represented as <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
<mml:msup>
<mml:mn>2</mml:mn>
<mml:mi>n</mml:mi>
</mml:msup>
<mml:mo>+</mml:mo>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mo></mml:mo>
<mml:mi>border</mml:mi>
</mml:mrow>
</mml:math> for some integer value of <i><tt>n</tt></i>.
</p><p>
<tt>GL_INVALID_VALUE</tt> is generated if <i><tt>border</tt></i> is not 0 or 1.
</p><p>
<tt>GL_INVALID_OPERATION</tt> is generated if <tt>glCopyTexImage1D</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="glCopyTexImage1D.3G-associated_gets"/><h2>Associated Gets</h2><p>
<a href="glGetTexImage.3G.xml"><tt>glGetTexImage</tt></a>
</p><p>
<a href="glIsEnabled.3G.xml"><tt>glIsEnabled</tt></a> with argument <tt>GL_TEXTURE_1D</tt>
</p></div><div class="refsect1" lang="en"><a name="glCopyTexImage1D.3G-see_also"/><h2>See Also</h2><p>
<span class="simplelist"><a href="glCopyPixels.3G.xml">glCopyPixels</a>, <a href="glCopyTexImage2D.3G.xml">glCopyTexImage2D</a>, <a href="glCopyTexSubImage1D.3G.xml">glCopyTexSubImage1D</a>, <a href="glCopyTexSubImage2D.3G.xml">glCopyTexSubImage2D</a>, <a href="glPixelStore.3G.xml">glPixelStore</a>, <a href="glPixelTransfer.3G.xml">glPixelTransfer</a>, <a href="glTexEnv.3G.xml">glTexEnv</a>, <a href="glTexGen.3G.xml">glTexGen</a>, <a href="glTexImage1D.3G.xml">glTexImage1D</a>, <a href="glTexImage2D.3G.xml">glTexImage2D</a>, <a href="glTexSubImage1D.3G.xml">glTexSubImage1D</a>, <a href="glTexSubImage2D.3G.xml">glTexSubImage2D</a>, <a href="glTexParameter.3G.xml">glTexParameter</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="glCopyPixels.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="glCopyTexImage2D.3G.xml">Next</a></td></tr><tr><td width="40%" align="left" valign="top">glCopyPixels</td><td width="20%" align="center"><a accesskey="h" href="index.xml">Home</a></td><td width="40%" align="right" valign="top">glCopyTexImage2D</td></tr></table></div></body></html>
|