glPixelStorei

glPixelStore: man2/glPixelStore.xml

glPixelStore sets pixel storage modes that affect the operation of subsequent glDrawPixels and glReadPixels as well as the unpacking of polygon stipple patterns (see glPolygonStipple ), bitmaps (see glBitmap ), texture patterns (see glTexImage1D, glTexImage2D, glTexImage3D, glTexSubImage1D, glTexSubImage2D, glTexSubImage3D ). Additionally, if the ARB_imaging extension is supported, pixel storage modes affect convolution filters (see glConvolutionFilter1D, glConvolutionFilter2D, and glSeparableFilter2D, color table (see glColorTable, and glColorSubTable, and unpacking histogram (See glHistogram ), and minmax (See glMinmax ) data. pname is a symbolic constant indicating the parameter to be set, and param is the new value. Six of the twelve storage parameters affect how pixel data is returned to client memory. They are as follows: The other six of the twelve storage parameters affect how pixel data is read from client memory. These values are significant for glDrawPixels, glTexImage1D, glTexImage2D, glTexImage3D, glTexSubImage1D, glTexSubImage2D, glTexSubImage3D, glBitmap, and glPolygonStipple. Additionally, if the ARB_imaging extension is supported, glColorTable, glColorSubTable, glConvolutionFilter1D, glConvolutionFilter2D, and glSeparableFilter2D. They are as follows: The following table gives the type, initial value, and range of valid values for each storage parameter that can be set with glPixelStore. pname Type Initial Value Valid Range GL_PACK_SWAP_BYTES boolean false true or false GL_PACK_LSB_FIRST boolean false true or false GL_PACK_ROW_LENGTH integer 0 0∞ GL_PACK_IMAGE_HEIGHT integer 0 0∞ GL_PACK_SKIP_ROWS integer 0 0∞ GL_PACK_SKIP_PIXELS integer 0 0∞ GL_PACK_SKIP_IMAGES integer 0 0∞ GL_PACK_ALIGNMENT integer 4 1, 2, 4, or 8 GL_UNPACK_SWAP_BYTES boolean false true or false GL_UNPACK_LSB_FIRST boolean false true or false GL_UNPACK_ROW_LENGTH integer 0 0∞ GL_UNPACK_IMAGE_HEIGHT integer 0 0∞ GL_UNPACK_SKIP_ROWS integer 0 0∞ GL_UNPACK_SKIP_PIXELS integer 0 0∞ GL_UNPACK_SKIP_IMAGES integer 0 0∞ GL_UNPACK_ALIGNMENT integer 4 1, 2, 4, or 8 glPixelStoref can be used to set any pixel store parameter. If the parameter type is boolean, then if param is 0, the parameter is false; otherwise it is set to true. If pname is a integer type parameter, param is rounded to the nearest integer. Likewise, glPixelStorei can also be used to set any of the pixel store parameters. Boolean parameters are set to false if param is 0 and true otherwise.

The pixel storage modes in effect when glDrawPixels, glReadPixels, glTexImage1D, glTexImage2D, glTexImage3D, glTexSubImage1D, glTexSubImage2D, glTexSubImage3D, glBitmap, or glPolygonStipple is placed in a display list control the interpretation of memory data. Likewise, if the ARB_imaging extension is supported, the pixel storage modes in effect when glColorTable, glColorSubTable, glConvolutionFilter1D, glConvolutionFilter2D, of glSeparableFilter2D is placed in a display list control the interpretation of memory data. The pixel storage modes in effect when a display list is executed are not significant. Pixel storage modes are client state and must be pushed and restored using glPushClientAttrib and glPopClientAttrib.

@OpenGL_Version(OGLIntroducedIn.V1P0)
fn_glPixelStorei glPixelStorei;

See Also

glBitmap, glColorTable, glColorSubTable, glConvolutionFilter1D, glConvolutionFilter2D, glSeparableFilter2D, glDrawPixels, glHistogram, glMinmax, glPixelMap, glPixelTransfer, glPixelZoom, glPolygonStipple, glPushClientAttrib, glReadPixels, glTexImage1D, glTexImage2D, glTexImage3D, glTexSubImage1D, glTexSubImage2D, glTexSubImage3D

Meta