HP b2600 Reference Manual page 39

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

Advertisement

If the GL version is 1.1 or greater, gluBuild2DMipmaps then uses proxy textures (see
glTexImage1D) to determine whether there's enough room for the requested texture in
the implementation. If not, width is halved (and halved again) until it fits.
gluBuild2DMipmaps then uses proxy textures (see glTexImage2D) to determine if the
implementation can store the requested texture in texture memory. If not, both
dimensions are continually halved until it fits.
Next, gluBuild2DMipmaps builds a series of images; it halves a copy of type (or a scaled
version of type, if necessary) along both dimensions until size 11 is reached. At each
level, each texel in the halved mipmap is an average of the corresponding four texels in
the larger mipmap. (In the case of rectangular images, halving the images repeatedly
eventually results in an n 1 or 1n configuration. Here, two texels are averaged instead.)
glTexImage2D is called to load each of these images by level. If width and height are
both powers of 2 which fit in the implementation, level 0 is a copy of data, and the
highest level is log
following mipmaps are built: 64 16, 32 8, 16 4, 8 2, 4 1, 2 1 and 1 1. These correspond
to levels 0 through 6, respectively.
See the glTexImage1D reference page for a description of the acceptable values for
format. See the glDrawPixels reference page for a description of the acceptable values for
type.
Notes
While you can't query the maximum level directly, you can derive it indirectly by calling
glGetTexLevelParameter. First, query for the width and height actually used at level 0.
(The width and height may be unequal to width and height since proxy textures might
have shrunk or expanded them if width or height are not powers of 2 or if the
implementation only supports smaller textures.) The maximum level can then be
derived using the formula log
Errors
See Also
glDrawPixels,
glTexImage1D,
glTexImage2D,
gluBuild1DMipmaps,
gluErrorString,
gluScaleImage
Chapter 2
(max(width, height)). For example, if width is 64 and height is 16, the
2
GLU_INVALID_VALUE is returned if width or height are negative.
GLU_INVALID_ENUM is returned if format or type is not one of the accepted
values.
(max(width, height)).
2
B
gluBuild2DMipmaps
39

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents