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 #37 background imageLoading...
Page #37 background image
B
gluBuild1DMipmaps
Chapter 2
37
Next, gluBuild1DMipmaps builds a series of mipmap levels; it halves a copy of data (or a
scaled version of data, if necessary) until size 1 is reached. At each level, each texel in
the halved image is an average of the corresponding two texels in the larger image.
glTexImage1D is called to load each of these images by level. If width is a power of 2
which fits in the implementation, level 0 is a copy of data, and the highest level is log2
width. For example, if width is 64, the following images are built: 64x1, 32x1, 16x1, 8x1,
4x1, 2x1 and 1x1. These correspond to levels 0 through 6, respectively.
See the glTexImage1D reference page for a description of the acceptable values for type.
See the glDrawPixels reference page for a description of the acceptable values for data.
Notes
While you can’t query the maximum level directly, you can derive it indirectly by calling
glGetTexLevelParameter. First, query for the width actually used at level 0. (The width
may be unequal to width since gluBuild1DMipmaps might have shrunk or expanded
width if width isn’t a power of 2 or if the implementation only supports smaller textures.
The maximum level can then be derived using the formula log
2
width.
Errors
GLU_INVALID_VALUE is returned if width is negative.
GLU_INVALID_ENUM is returned if format or type is not one of the accepted
values.
Bugs
Passing GL_STENCIL_INDEX or GL_DEPTH_COMPONENT as format will incorrectly
return 0 and set the error code to GL_INVALID_ENUM. It should return
GLU_INVALID_ENUM and not set an error code.
See Also
glTexImage1D,
gluBuild2DMipmaps,
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