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 #39 background imageLoading...
Page #39 background image
B
gluBuild2DMipmaps
Chapter 2
39
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
2
(max(width, height)). For example, if width is 64 and height is 16, the
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
2
(max(width, height)).
Errors
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.
See Also
glDrawPixels,
glTexImage1D,
glTexImage2D,
gluBuild1DMipmaps,
gluErrorString,
gluScaleImage

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