HP b2600 Reference Manual page 382

Opengl 1.1 reference
Hide thumbs Also See for b2600:
Table of Contents

Advertisement

R
glReadPixels
If format is GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_RGB, GL_RGBA,
GL_LUMINANCE, or GL_LUMINANCE_ALPHA and type is not GL_FLOAT, each
component is multiplied by the multiplier shown in the following table. If type is
GL_FLOAT, then each component is passed as is (or converted to the client's
single-precision floating-point format if it is different from the one used by the GL).
Return values are placed in memory as follows. If format is GL_COLOR_INDEX,
GL_STENCIL_INDEX, GL_DEPTH_COMPONENT, GL_RED, GL_GREEN, GL_BLUE,
GL_ALPHA, or GL_LUMINANCE, a single value is returned and the data for the ith
pixel in the jth row is placed in location j · width + i. GL_RGB returns three values,
GL_RGBA returns four values, and GL_LUMINANCE_ALPHA returns two values for
each pixel, with all values corresponding to a single pixel occupying contiguous space in
pixels. Storage parameters set by glPixelStore, such as GL_PACK_LSB_FIRST and
GL_PACK_SWAP_BYTES, affect the way that data is written into memory. See
glPixelStore for a description.
Notes
Values for pixels that lie outside the window connected to the current GL context are
undefined.
If an error is generated, no change is made to the contents of pixels.
Errors
382
Type
GL_UNSIGNED_BYTE
GL_BYTE
GL_BITMAP
GL_UNSIGNED_SHORT
GL_SHORT
GL_UNSIGNED_INT
GL_INT
GL_FLOAT
GL_INVALID_ENUM is generated if format or type is not an accepted value.
GL_INVALID_VALUE is generated if either width or height is negative.
GL_INVALID_OPERATION is generated if format is GL_COLOR_INDEX and the
color buffers store RGBA color components.
GL_INVALID_OPERATION is generated if format is GL_STENCIL_INDEX and
there is no stencil buffer.
GL_INVALID_OPERATION is generated if format is GL_DEPTH_COMPONENT
and there is no depth buffer.
Index
Component
Mask
Conversion
8
8
2
- 1
(2
- 1)c
7
8
2
- 1
[(2
- 1)c - 1] / 2
1
1
16
16
2
- 1
(2
- 1)c
15
16
2
- 1
[(2
- 1)c - 1] / 2
32
32
2
- 1
(2
- 1)c
31
32
2
- 1
[(2
- 1)c - 1] / 2
none
c
Chapter 16

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents