Graphics Reference
In-Depth Information
Table 9-2
Pixel Storage Options
Pixel Storage Option
Initial Value
Description
GL_UNPACK_ALIGNMENT
GL_PACK_ALIGNMENT
4
Specifies the alignment of rows in
an image. By default, images begin
at 4-byte boundaries. Setting the
value to 1 means that the image is
tightly packed and rows are aligned
to a byte boundary.
GL_UNPACK_ROW_LENGTH
GL_PACK_ROW_LENGTH
0
If the value is non-zero, gives the
number of pixels in a row of the
image. If the value is zero, then
the row length is the width of the
image (i.e., it is tightly packed).
0
If the value is non-zero, gives the
number of pixels in a column of an
image that is part of a 3D texture.
This option can be used to have
padding of columns in between
slices of a 3D texture. If the value is
zero, then the number of columns
in the image is equal to the height
(i.e., it is tightly packed).
GL_UNPACK_IMAGE_HEIGHT
GL_PACK_IMAGE_HEIGHT
0
If the value is non-zero, gives the
number of pixels to skip at the
beginning of a row.
GL_UNPACK_SKIP_PIXELS
GL_PACK_SKIP_PIXELS
0
If the value is non-zero, gives the
number of rows to skip at the
beginning of the image.
GL_UNPACK_SKIP_ROWS
GL_PACK_SKIP_ROWS
GL_UNPACK_SKIP_IMAGES
GL_PACK_SKIP_IMAGES
0
If the value is non-zero, gives the
number of images in a 3D texture
to skip.
The last part of the code uses glTexParameteri to set the minification
and magnification filtering modes to GL_NEAREST . This code is required
because we have not loaded a complete mipmap chain for the texture;
thus we must select a non-mipmapped minification filter. The other
option would have been to use minification and magnification modes of
GL_LINEAR , which provides bilinear non-mipmapped filtering. The details
of texture filtering and mipmapping are explained in the next section.
 
 
Search WWH ::




Custom Search