*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> OpenGL/glcopyteximage2dext (3)              
Title
Content
Arch
Section
 

Contents


glCopyTexImage2DEXT(3G)	       OpenGL Reference	       glCopyTexImage2DEXT(3G)


NAME    [Toc]    [Back]

     glCopyTexImage2DEXT - copy	pixels into a 2D texture image

C SPECIFICATION    [Toc]    [Back]

     void glCopyTexImage2DEXT( GLenum target,
			       GLint level,
			       GLenum internalformat,
			       GLint x,
			       GLint y,
			       GLsizei width,
			       GLsizei height,
			       GLint border )

PARAMETERS    [Toc]    [Back]

     target	     The target	texture.  Must be GL_TEXTURE_2D	or
		     GL_DETAIL_TEXTURE_2D_SGIS.

     level	     The level-of-detail number.  Level	0 is the base image
		     level.  Level n is	the nth	mipmap reduction image.

     internalformat  The internal storage format of the	texture	image.	Must
		     be	one of the following symbolic constants:  GL_ALPHA,
		     GL_ALPHA4_EXT, GL_ALPHA8_EXT, GL_ALPHA12_EXT,
		     GL_ALPHA16_EXT, GL_LUMINANCE, GL_LUMINANCE4_EXT,
		     GL_LUMINANCE8_EXT,	GL_LUMINANCE12_EXT,
		     GL_LUMINANCE16_EXT, GL_LUMINANCE_ALPHA,
		     GL_LUMINANCE4_ALPHA4_EXT, GL_LUMINANCE6_ALPHA2_EXT,
		     GL_LUMINANCE8_ALPHA8_EXT, GL_LUMINANCE12_ALPHA4_EXT,
		     GL_LUMINANCE12_ALPHA12_EXT, GL_LUMINANCE16_ALPHA16_EXT,
		     GL_INTENSITY_EXT, GL_INTENSITY4_EXT, GL_INTENSITY8_EXT,
		     GL_INTENSITY12_EXT, GL_INTENSITY16_EXT,
		     GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT16_SGIX,
		     GL_DEPTH_COMPONENT24_SGIX,	GL_DEPTH_COMPONENT32_SGIX,
		     GL_RGB, GL_RGB2_EXT, GL_RGB4_EXT, GL_RGB5_EXT,
		     GL_RGB8_EXT, GL_RGB10_EXT,	GL_RGB12_EXT, GL_RGB16_EXT,
		     GL_RGBA, GL_RGBA2_EXT, GL_RGBA4_EXT, GL_RGB5_A1_EXT,
		     GL_RGBA8_EXT, GL_RGB10_A2_EXT, GL_RGBA12_EXT,
		     GL_RGBA16_EXT.  (Note that	the values 1, 2, 3, and	4,
		     which are accepted	by glTexImage2D, are not accepted by
		     glCopyTexImage2DEXT.)

     x		     The x coordinate of the lower-left	corner of the pixel
		     rectangle to be transferred to the	texture	array.

     y		     The y coordinate of the lower-left	corner of the pixel
		     rectangle to be transferred to the	texture	array.

     width	     The width of the texture image.





									Page 1






glCopyTexImage2DEXT(3G)	       OpenGL Reference	       glCopyTexImage2DEXT(3G)



     height	     The height	of the texture image.

     border	     The border	width of the texture.  Must be 0 or 1.

DESCRIPTION    [Toc]    [Back]

     glCopyTexImage2DEXT defines a two-dimensional texture image with pixels
     from the current GL_READ_BUFFER (rather than from main memory, as is the
     case for glTexImage2D).

     The screen-aligned	pixel rectangle	with lower-left	corner at (x, y)
     having width width+2*border and height height+2*border is used to define
     the texture array at the mipmap level specified by	level.	(But see the
     discussion	of GL_INTERLACE_SGIX below.)  The internal format of the
     texture array is selected by internalformat.

     The pixels	in the rectangle are processed exactly as if glCopyPixels 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 format	for storage in the texel
     array.

     Pixel ordering is such that lower x screen	coordinates correspond to
     lower i texture coordinates, and lower y screen coordinates correspond to
     lower j texture coordinates.

     If	any of the pixels within the specified rectangle of the	current
     GL_READ_BUFFER are	outside	the window associated with the current
     rendering context,	then the values	obtained for those pixels are
     undefined.

     When GL_INTERLACE_READ_INGR is enabled, every other row of	the source
     pixel rectangle is	read.  The height of the source	pixel rectangle	is
     equivalent	to 2xheight.  Only rows	(y+0,y+2,...) of the source rectangle
     are used to define	the rows of the	texture	image that are affected	by the
     copy.

     When GL_INTERLACE_SGIX is enabled,	source pixels define every other row
     of	the texture image, rather than successive rows of the texture image.
     Rows (0,2,4,...)  of the texture image are	defined, while rows
     (1,3,5,...) are left undefined.  Note, that when GL_INTERLACE_SGIX	is
     enabled the total height (i.e., the height	of interior texture image plus
     twice the border) of the defined texture is 2xheight.

     If	internalformat is one of GL_DEPTH_COMPONENT,
     GL_DEPTH_COMPONENT16_SGIX,	GL_DEPTH_COMPONENT24_SGIX, or
     GL_DEPTH_COMPONENT32_SGIX,	the pixel values will be read from the depth
     buffer instead of the current GL_READ_BUFFER.








									Page 2






glCopyTexImage2DEXT(3G)	       OpenGL Reference	       glCopyTexImage2DEXT(3G)



NOTES
     glCopyTexImage2DEXT is part of the	EXT_copy_texture extension.  See
     glIntro for more information about	using extensions.

ERRORS    [Toc]    [Back]

     GL_INVALID_ENUM is	generated when target is not one of the	allowable
     values.

     GL_INVALID_VALUE is generated if level is less than zero or greater than
     log (max),	where max is the returned value	of GL_MAX_TEXTURE_SIZE.
	2

     GL_INVALID_VALUE is generated if the specified image is too large.

     GL_INVALID_VALUE is generated if width or height is less than zero,
     greater than 2+GL_MAX_TEXTURE_SIZE, when width cannot be represented as
      k
     2 +2border	for some integer k, or when height cannot be represented as
      k
     2 +Ixborder, where	I is 2 when GL_INTERLACE_SGIX is disabled and 1
     otherwise.

     GL_INVALID_VALUE is generated if border is	not 0 or 1.

     GL_INVALID_VALUE is generated if internalformat is	not one	of the
     allowable values.

     GL_INVALID_OPERATION is generated if glCopyTexImage2DEXT is executed
     between the execution of glBegin and the corresponding execution of
     glEnd.

ASSOCIATED GETS    [Toc]    [Back]

     glGetTexImage


MACHINE	DEPENDENCIES
     RealityEngine, RealityEngine2, and	VTX systems do not support color
     matrix transformations on images as they are loaded to or read back from
     texture memory.

     RealityEngine, RealityEngine2, and	VTX systems support glCopyTexImage2D
     and glCopyTexImage2DEXT with the following	restrictions:

	  1.  Only level 0 is supported; other levels result in	a
	      GL_INVALID_VALUE error.

	  2.  glCopyTexImage2D and glCopyTexImage2DEXT cannot be used if a GLX
	      video source is the current read drawable	(see
	      glXMakeCurrentReadSGI).  Executing it will generate a
	      GL_INVALID_OPERATION error.

	  3.  GL_INTERLACE_SGIX	is not supported (see glEnable).






									Page 3






glCopyTexImage2DEXT(3G)	       OpenGL Reference	       glCopyTexImage2DEXT(3G)



	  4.  Borders are not supported; hence the width of the	border should
	      be 0.

     On	InfiniteReality	systems, there is a performance	benefit	when the width
     of	the image to be	transferred to texture memory is a multiple of 8.

     Texture borders are not supported on InfiniteReality systems.
     Applications should use borderless	textures and GL_CLAMP_TO_EDGE_SGIS
     wrap mode.

     The SGIX_interlace	extension is supported only on InfiniteReality
     systems, on RealityEngine,	RealityEngine2,	and VTX	systems, on Octane2
     VPro systems, and on O2 systems.

     The INGR_interlace_read extension is supported only on Octane2 VPro
     systems, and on O2	systems.

SEE ALSO    [Toc]    [Back]

      
      
     glTexImage2D, glCopyTexSubImage2DEXT, glCopyPixels.


									PPPPaaaaggggeeee 4444
[ Back ]
 Similar pages
Name OS Title
glcopyteximage1dext IRIX copy pixels into a 1D texture image
glCopyTexImage1D Tru64 copy pixels into a 1D texture image
glcopyteximage1d IRIX copy pixels into a 1D texture image
glcopytexsubimage2dext IRIX copy pixels into a 2D texture subimage
glcopytexsubimage3dext IRIX copy pixels into a 3D texture subimage
glcopytexsubimage1dext IRIX copy pixels into a 1D texture subimage
glCopyPixels Tru64 copy pixels in the frame buffer
glcopycolortable IRIX copy pixels into a color table
glcopycolortablesgi IRIX copy pixels into a color table
glcopypixels IRIX copy pixels in the frame buffer
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service