1GLUBUILD1DMIPMAPLEVELS(3G)                          GLUBUILD1DMIPMAPLEVELS(3G)
2
3
4

NAME

6       gluBuild1DMipmapLevels - builds a subset of one-dimensional mipmap lev‐
7       els
8
9

C SPECIFICATION

11       GLint gluBuild1DMipmapLevels( GLenum target,
12                                     GLint internalFormat,
13                                     GLsizei width,
14                                     GLenum format,
15                                     GLenum type,
16                                     GLint level,
17                                     GLint base,
18                                     GLint max,
19                                     const void *data )
20
21

PARAMETERS

23       target          Specifies the target texture.  Must be GL_TEXTURE_1D.
24
25       internalFormat  Requests the internal storage  of  the  texture  image.
26                       The  most  current version of the SGI implementation of
27                       GLU does not check this value for validity before pass‐
28                       ing  it  on to the underlying OpenGL implementation.  A
29                       value that is not accepted by the OpenGL implementation
30                       will  lead  to  an  OpenGL  error.   The benefit of not
31                       checking this value at the GLU  level  is  that  OpenGL
32                       extensions can add new internal texture formats without
33                       requiring a revision of the GLU implementation.   Older
34                       implementations of GLU check this value and raise a GLU
35                       error if it is not 1, 2, 3, or 4 or one of the  follow‐
36                       ing symbolic constants: GL_ALPHA, GL_ALPHA4, GL_ALPHA8,
37                       GL_ALPHA12,  GL_ALPHA16,  GL_LUMINANCE,  GL_LUMINANCE4,
38                       GL_LUMINANCE8,      GL_LUMINANCE12,     GL_LUMINANCE16,
39                       GL_LUMINANCE_ALPHA,               GL_LUMINANCE4_ALPHA4,
40                       GL_LUMINANCE6_ALPHA2,             GL_LUMINANCE8_ALPHA8,
41                       GL_LUMINANCE12_ALPHA4,          GL_LUMINANCE12_ALPHA12,
42                       GL_LUMINANCE16_ALPHA16,   GL_INTENSITY,  GL_INTENSITY4,
43                       GL_INTENSITY8, GL_INTENSITY12, GL_INTENSITY16,  GL_RGB,
44                       GL_R3_G3_B2,   GL_RGB4,   GL_RGB5,  GL_RGB8,  GL_RGB10,
45                       GL_RGB12,  GL_RGB16,   GL_RGBA,   GL_RGBA2,   GL_RGBA4,
46                       GL_RGB5_A1,   GL_RGBA8,   GL_RGB10_A2,   GL_RGBA12   or
47                       GL_RGBA16.
48
49       width           Specifies the width in pixels  of  the  texture  image.
50                       This should be a power of 2.
51
52       format          Specifies  the   of  the  pixel  data.  Must be one of:
53                       GL_COLOR_INDEX, GL_DEPTH_COMPONENT,  GL_RED,  GL_GREEN,
54                       GL_BLUE,  GL_ALPHA,  GL_RGB,  GL_RGBA, GL_BGR, GL_BGRA,
55                       GL_LUMINANCE, or GL_LUMINANCE_ALPHA.
56
57       type            Specifies the data type for  data.   Must  be  one  of:
58                       GL_UNSIGNED_BYTE,          GL_BYTE,          GL_BITMAP,
59                       GL_UNSIGNED_SHORT, GL_SHORT,  GL_UNSIGNED_INT,  GL_INT,
60                       GL_FLOAT,                       GL_UNSIGNED_BYTE_3_3_2,
61                       GL_UNSIGNED_BYTE_2_3_3_REV,    GL_UNSIGNED_SHORT_5_6_5,
62                       GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4,
63                       GL_UNSIGNED_SHORT_4_4_4_4_REV,
64                       GL_UNSIGNED_SHORT_5_5_5_1,
65                       GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8,
66                       GL_UNSIGNED_INT_8_8_8_8_REV,
67                       GL_UNSIGNED_INT_10_10_10_2,                          or
68                       GL_UNSIGNED_INT_2_10_10_10_REV.
69
70       level           Specifies the mipmap level of the image data.
71
72       base            Specifies  the minimum mipmap level to pass to glTexIm‐
73                       age1D.
74
75       max             Specifies the maximum mipmap level to pass to  glTexIm‐
76                       age1D.
77
78       data            Specifies a pointer to the image data in memory.
79

DESCRIPTION

81       gluBuild1DMipmapLevels  builds  a subset of prefiltered one-dimensional
82       texture maps of decreasing resolutions called a mipmap.  This  is  used
83       for the antialiasing of texture mapped primitives.
84
85       A return value of zero indicates success, otherwise a GLU error code is
86       returned (see gluErrorString).
87
88       A series of mipmap levels from base to max is built by decimating  data
89       in  half  until  size  1×1 is reached. At each level, each texel in the
90       halved mipmap level is an average of the corresponding  two  texels  in
91       the  larger  mipmap level.  glTexImage1D is called to load these mipmap
92       levels from base to max. If max is larger than the highest mipmap level
93       for  the  texture  of  the  specified  size,  then  a GLU error code is
94       returned (see gluErrorString) and nothing is loaded.
95
96       For example, if level is 2 and width is 16, the  following  levels  are
97       possible:  16×1,  8×1,  4×1,  2×1,  1×1.  These  correspond to levels 2
98       through 6 respectively.  If base is 3 and max is 5,  then  only  mipmap
99       levels  8×1, 4×1 and 2×1 are loaded. However, if max is 7 then an error
100       is returned and nothing is loaded since max is larger than the  highest
101       mipmap level which is, in this case, 6.
102
103       The   highest   mipmap   level   can   be   derived  from  the  formula
104       log2(width2level).
105
106       See the glTexImage1D reference page for a description of the acceptable
107       values  for  type  parameter. See the glDrawPixels reference page for a
108       description of the acceptable values for level parameter.
109

NOTES

111       gluBuild1DMipmapLevels is only available if the GLU version is  1.3  or
112       greater.
113
114       Formats   GL_BGR,   and   GL_BGRA,  and  types  GL_UNSIGNED_BYTE_3_3_2,
115       GL_UNSIGNED_BYTE_2_3_3_REV,                    GL_UNSIGNED_SHORT_5_6_5,
116       GL_UNSIGNED_SHORT_5_6_5_REV,                 GL_UNSIGNED_SHORT_4_4_4_4,
117       GL_UNSIGNED_SHORT_4_4_4_4_REV,               GL_UNSIGNED_SHORT_5_5_5_1,
118       GL_UNSIGNED_SHORT_1_5_5_5_REV,                 GL_UNSIGNED_INT_8_8_8_8,
119       GL_UNSIGNED_INT_8_8_8_8_REV,      GL_UNSIGNED_INT_10_10_10_2,       and
120       GL_UNSIGNED_INT_2_10_10_10_REV  are only available if the GL version is
121       1.2 or greater.
122

ERRORS

124       GLU_INVALID_VALUE is returned if level > base, base < 0, max < base  or
125       max is > the highest mipmap level for data.
126
127       GLU_INVALID_VALUE is returned if width is < 1.
128
129       GLU_INVALID_ENUM is returned if internalFormat, format, or type are not
130       legal.
131
132       GLU_INVALID_OPERATION is returned if type is GL_UNSIGNED_BYTE_3_3_2  or
133       GL_UNSIGNED_BYTE_2_3_3_REV and format is not GL_RGB.
134
135       GLU_INVALID_OPERATION is returned if type is GL_UNSIGNED_SHORT_5_6_5 or
136       GL_UNSIGNED_SHORT_5_6_5_REV and format is not GL_RGB.
137
138       GLU_INVALID_OPERATION is returned if type is  GL_UNSIGNED_SHORT_4_4_4_4
139       or  GL_UNSIGNED_SHORT_4_4_4_4_REV  and  format  is  neither GL_RGBA nor
140       GL_BGRA.
141
142       GLU_INVALID_OPERATION is returned if type is  GL_UNSIGNED_SHORT_5_5_5_1
143       or  GL_UNSIGNED_SHORT_1_5_5_5_REV  and  format  is  neither GL_RGBA nor
144       GL_BGRA.
145
146       GLU_INVALID_OPERATION is returned if type is GL_UNSIGNED_INT_8_8_8_8 or
147       GL_UNSIGNED_INT_8_8_8_8_REV and format is neither GL_RGBA nor GL_BGRA.
148
149       GLU_INVALID_OPERATION is returned if type is GL_UNSIGNED_INT_10_10_10_2
150       or GL_UNSIGNED_INT_2_10_10_10_REV and format  is  neither  GL_RGBA  nor
151       GL_BGRA.
152

SEE ALSO

154       glDrawPixels(3G), glTexImage1D(3G), glTexImage2D(3G), glTexImage3D(3G),
155       gluBuild1DMipmaps(3G),  gluBuild2DMipmaps(3G),   gluBuild3DMipmaps(3G),
156       gluErrorString(3G),    glGetTexImage(3G),   glGetTexLevelParameter(3G),
157       gluBuild2DMipmapLevels(3G), gluBuild3DMipmapLevels(3G)
158
159
160
161                                                    GLUBUILD1DMIPMAPLEVELS(3G)
Impressum