EasyManuals Logo

HP b2600 Reference Guide

HP b2600
486 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #122 background imageLoading...
Page #122 background image
D
glDrawPixels
Chapter 4
122
width × height pixels are read from memory, starting at location pixels. By default, these
pixels are taken from adjacent memory locations, except that after all width pixels are
read, the read pointer is advanced to the next four-byte boundary. The four-byte row
alignment is specified by glPixelStore with argument GL_UNPACK_ALIGNMENT, and
it can be set to one, two, four, or eight bytes. Other pixel store parameters specify
different read pointer advancements, both before the first pixel is read and after all
width pixels are read. See the glPixelStore reference page for details on these options.
The width × height pixels that are read from memory are each operated on in the same
way, based on the values of several parameters specified by glPixelTransfer and
glPixelMap. The details of these operations, as well as the target buffer into which the
pixels are drawn, are specific to the format of the pixels, as specified by format. format
can assume one of eleven symbolic values:
GL_COLOR_INDEX
Each pixel is a single value, a color index. It is converted to fixed-point format, with an
unspecified number of bits to the right of the binary point, regardless of the memory data
type. Floating-point values convert to true fixed-point values. Signed and unsigned
integer data is converted with all fraction bits set to 0. Bitmap data convert to either 0 or
1.
Each fixed-point index is then shifted left by GL_INDEX_SHIFT bits and added to
GL_INDEX_OFFSET. If GL_INDEX_SHIFT is negative, the shift is to the right. In
either case, zero bits fill otherwise unspecified bit locations in the result.
If the GL is in RGBA mode, the resulting index is converted to an RGBA pixel with the
help of the GL_PIXEL_MAP_I_TO_R, GL_PIXEL_MAP_I_TO_G,
GL_PIXEL_MAP_I_TO_B, and GL_PIXEL_MAP_I_TO_A tables. If the GL is in color
index mode, and if GL_MAP_COLOR is true, the index is replaced with the value that it
references in lookup table GL_PIXEL_MAP_I_TO_I. Whether the lookup replacement of
the index is done or not, the integer part of the index is then ANDed with 2
b
- 1, where b
is the number of bits in a color index buffer.
The GL then converts the resulting indices or RGBA colors to fragments by attaching the
current raster position z coordinate and texture coordinates to each pixel, then assigning
x and y window coordinates to the nth fragment such that
x
n
= x
r
+ n mod width
y
n
= y
r
+ n/width
where (x
r
, y
r
) is the current raster position.These pixel fragments are then treated just
like the fragments generated by rasterizing points, lines, or polygons. Texture mapping,
fog, and all the fragment operations are applied before the fragments are written to the
frame buffer.
GL_STENCIL_INDEX
Each pixel is a single value, a stencil index. It is converted to fixed-point format, with an
unspecified number of bits to the right of the binary point, regardless of the memory data
type. Floating-point values convert to true fixed-point values. Signed and unsigned
integer data is converted with all fraction bits set to 0. Bitmap data convert to either 0 or
1.
Each fixed-point index is then shifted left by GL_INDEX_SHIFT bits, and added to
GL_INDEX_OFFSET. If GL_INDEX_SHIFT is negative, the shift is to the right. In
either case, zero bits fill otherwise unspecified bit locations in the result. If

Table of Contents

Other manuals for HP b2600

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the HP b2600 and is the answer not in the manual?

HP b2600 Specifications

General IconGeneral
BrandHP
Modelb2600
CategoryDesktop
LanguageEnglish

Related product manuals