NAME
glCopyTexImage2D
- copy pixels into a 2D texture image
C SPECIFICATION
void ggllCCooppyyTTeexxIImmaaggee22DD(
GLenum _t_a_r_g_e_t,
GLint _l_e_v_e_l,
GLenum _i_n_t_e_r_n_a_l_f_o_r_m_a_t,
GLint _x,
GLint _y,
GLsizei _w_i_d_t_h,
GLsizei _h_e_i_g_h_t,
GLint _b_o_r_d_e_r )
delim $$
PARAMETERS
-
_t_a_r_g_e_t
-
Specifies the target texture.
Must be GGLL__TTEEXXTTUURREE__22DD.
-
_l_e_v_e_l
-
Specifies the level-of-detail number.
Level 0 is the base image level.
Level _n is the _nth mipmap reduction image.
-
_i_n_t_e_r_n_a_l_f_o_r_m_a_t
-
Specifies the internal of the texture.
Must be one of the following symbolic constants:
GGLL__AALLPPHHAA,
GGLL__AALLPPHHAA44,
GGLL__AALLPPHHAA88,
GGLL__AALLPPHHAA1122,
GGLL__AALLPPHHAA1166,
GGLL__LLUUMMIINNAANNCCEE,
GGLL__LLUUMMIINNAANNCCEE44,
GGLL__LLUUMMIINNAANNCCEE88,
GGLL__LLUUMMIINNAANNCCEE1122,
GGLL__LLUUMMIINNAANNCCEE1166,
GGLL__LLUUMMIINNAANNCCEE__AALLPPHHAA,
GGLL__LLUUMMIINNAANNCCEE44__AALLPPHHAA44,
GGLL__LLUUMMIINNAANNCCEE66__AALLPPHHAA22,
GGLL__LLUUMMIINNAANNCCEE88__AALLPPHHAA88,
GGLL__LLUUMMIINNAANNCCEE1122__AALLPPHHAA44,
GGLL__LLUUMMIINNAANNCCEE1122__AALLPPHHAA1122,
GGLL__LLUUMMIINNAANNCCEE1166__AALLPPHHAA1166,
GGLL__IINNTTEENNSSIITTYY,
GGLL__IINNTTEENNSSIITTYY44,
GGLL__IINNTTEENNSSIITTYY88,
GGLL__IINNTTEENNSSIITTYY1122,
GGLL__IINNTTEENNSSIITTYY1166,
GGLL__RRGGBB,
GGLL__RR33__GG33__BB22,
GGLL__RRGGBB44,
GGLL__RRGGBB55,
GGLL__RRGGBB88,
GGLL__RRGGBB1100,
GGLL__RRGGBB1122,
GGLL__RRGGBB1166,
GGLL__RRGGBBAA,
GGLL__RRGGBBAA22,
GGLL__RRGGBBAA44,
GGLL__RRGGBB55__AA11,
GGLL__RRGGBBAA88,
GGLL__RRGGBB1100__AA22,
GGLL__RRGGBBAA1122, or
GGLL__RRGGBBAA1166.
-
_x, _y
-
Specify the window coordinates of the lower left corner
of the rectangular region of pixels to be copied.
-
_w_i_d_t_h
-
Specifies the width of the texture image.
Must be 0 or $2 sup n ~+~ 2*$_b_o_r_d_e_r for some integer $n$.
-
_h_e_i_g_h_t
-
Specifies the height of the texture image.
Must be 0 or $2 sup m ~+~ 2*$_b_o_r_d_e_r for some integer $m$.
-
_b_o_r_d_e_r
-
Specifies the width of the border.
Must be either 0 or 1.
DESCRIPTION
ggllCCooppyyTTeexxIImmaaggee22DD defines a two-dimensional texture image with pixels from the current
GGLL__RREEAADD__BBUUFFFFEERR.
The screen-aligned pixel rectangle with lower left corner at (_x,
_y) and with a width of _w_i_d_t_h$~+~2~*~$_b_o_r_d_e_r and a height of
_h_e_i_g_h_t$~+~2~*~$_b_o_r_d_e_r
defines the texture array
at the mipmap level specified by _l_e_v_e_l.
_i_n_t_e_r_n_a_l_f_o_r_m_a_t specifies the internal of the texture array.
The pixels in the rectangle are processed exactly as if
ggllCCooppyyPPiixxeellss 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.
Pixel ordering is such that lower $x$ and $y$ screen coordinates correspond to
lower $s$ and $t$ texture coordinates.
If any of the pixels within the specified rectangle of the current
GGLL__RREEAADD__BBUUFFFFEERR are outside the window associated with the current
rendering context, then the values obtained for those pixels are undefined.
NOTES
ggllCCooppyyTTeexxIImmaaggee22DD is available only if the GL version is 1.1 or greater.
Texturing has no effect in color index mode.
1, 2, 3, and 4 are not accepted values for _i_n_t_e_r_n_a_l_f_o_r_m_a_t.
An image with height or width of 0 indicates a NULL texture.
When the GGLL__AARRBB__iimmaaggiinngg extension is supported, the RGBA components
read from the framebuffer may be processed by the imaging pipeline. See
ggllTTeexxIImmaaggee11DD for specific details.
ERRORS
GGLL__IINNVVAALLIIDD__EENNUUMM is generated if _t_a_r_g_e_t is not GGLL__TTEEXXTTUURREE__22DD.
GGLL__IINNVVAALLIIDD__VVAALLUUEE is generated if _l_e_v_e_l is less than 0.
GGLL__IINNVVAALLIIDD__VVAALLUUEE may be generated if _l_e_v_e_l is greater
than $log sub 2 max$,
where $max$ is the returned value of GGLL__MMAAXX__TTEEXXTTUURREE__SSIIZZEE.
GGLL__IINNVVAALLIIDD__VVAALLUUEE is generated if _w_i_d_t_h or _h_e_i_g_h_t is less than 0,
greater than $2~+~$GGLL__MMAAXX__TTEEXXTTUURREE__SSIIZZEE, or if _w_i_d_t_h or _h_e_i_g_h_t cannot be
represented as $2 sup k ~+~ 2~*~$_b_o_r_d_e_r for some integer
$k$.
GGLL__IINNVVAALLIIDD__VVAALLUUEE is generated if _b_o_r_d_e_r is not 0 or 1.
GGLL__IINNVVAALLIIDD__VVAALLUUEE is generated if _i_n_t_e_r_n_a_l_f_o_r_m_a_t is not one of the
allowable values.
GGLL__IINNVVAALLIIDD__OOPPEERRAATTIIOONN is generated if ggllCCooppyyTTeexxIImmaaggee22DD is executed
between the execution of ggllBBeeggiinn and the corresponding
execution of ggllEEnndd.
ASSOCIATED GETS
ggllGGeettTTeexxIImmaaggee
ggllIIssEEnnaabblleedd with argument GGLL__TTEEXXTTUURREE__22DD
SEE ALSO
ggllCCooppyyPPiixxeellss((33GG)),
ggllCCooppyyTTeexxIImmaaggee11DD((33GG)),
ggllCCooppyyTTeexxSSuubbIImmaaggee11DD((33GG)),
ggllCCooppyyTTeexxSSuubbIImmaaggee22DD((33GG)),
ggllPPiixxeellSSttoorree((33GG)),
ggllPPiixxeellTTrraannssffeerr((33GG)),
ggllTTeexxEEnnvv((33GG)),
ggllTTeexxGGeenn((33GG)),
ggllTTeexxIImmaaggee11DD((33GG)),
ggllTTeexxIImmaaggee22DD((33GG)),
ggllTTeexxSSuubbIImmaaggee11DD((33GG)),
ggllTTeexxSSuubbIImmaaggee22DD((33GG)),
ggllTTeexxPPaarraammeetteerr((33GG))