glColorTable, glConvolutionFilter1D, glConvolutionFilter2D, glDepthFunc, glDrawBuffer, glDrawPixels, glMatrixMode, glPixelMap, glPixelTransfer, glPixelZoom, glRasterPos, glReadBuffer, glReadPixels, glSeparableFilter2D, glStencilFunc, glWindowPos
Copyright 1991-2006 Silicon Graphics, Inc. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.
Page generated by adrdox
glCopyPixels: man2/glCopyPixels.xml
glCopyPixels copies a screen-aligned rectangle of pixels from the specified frame buffer location to a region relative to the current raster position. Its operation is well defined only if the entire pixel source region is within the exposed portion of the window. Results of copies from outside the window, or from regions of the window that are not exposed, are hardware dependent and undefined. x and y specify the window coordinates of the lower left corner of the rectangular region to be copied. width and height specify the dimensions of the rectangular region to be copied. Both width and height must not be negative. Several parameters control the processing of the pixel data while it is being copied. These parameters are set with three commands: glPixelTransfer, glPixelMap, and glPixelZoom. This reference page describes the effects on glCopyPixels of most, but not all, of the parameters specified by these three commands. glCopyPixels copies values from each pixel with the lower left-hand corner at x + i y + j for 0 <= i < width and 0 <= j < height. This pixel is said to be the i th pixel in the j th row. Pixels are copied in row order from the lowest to the highest row, left to right in each row. type specifies whether color, depth, or stencil data is to be copied. The details of the transfer for each data type are as follows: The rasterization described thus far assumes pixel zoom factors of 1.0. If glPixelZoom is used to change the x and y pixel zoom factors, pixels are converted to fragments as follows. If x r y r is the current raster position, and a given pixel is in the i th location in the j th row of the source pixel rectangle, then fragments are generated for pixels whose centers are in the rectangle with corners at x r + zoom x ⁢ i y r + zoom y ⁢ j and x r + zoom x ⁡ i + 1 y r + zoom y ⁡ j + 1 where zoom x is the value of GL_ZOOM_X and zoom y is the value of GL_ZOOM_Y.
Modes specified by glPixelStore have no effect on the operation of glCopyPixels.