HP b2600 Reference Manual page 450

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

Advertisement

T
glTexParameter
Description
Texture mapping is a technique that applies an image onto an object's surface as if the
image were a decal or cellophane shrink-wrap. The image is created in texture space,
with an (s, t) coordinate system. A texture is a one- or two-dimensional image and a set of
parameters that determine how samples are derived from the image.
glTexParameter assigns the value or values in params to the texture parameter
specified as pname. target defines the target texture, either GL_TEXTURE_1D or
GL_TEXTURE_2D. The following symbols are accepted in pname:
GL_TEXTURE_MIN_FILTER
The texture minifying function is used whenever the pixel being textured maps to an
area greater than one texture element. There are six defined minifying functions. Two of
them use the nearest one or nearest four texture elements to compute the texture value.
The other four use mipmaps.
A mipmap is an ordered set of arrays representing the same image at progressively
lower resolutions: 2
mipmaps.
For example, if a 2D texture has dimensions 2m 2n, there are max(m, n) + 1 mipmaps.
The first mipmap is the original texture, with dimensions 2m 2n. Each subsequent
mipmap has dimensions 2
mipmap, until either k=0 or l=0. At that point, subsequent mipmaps have dimension 1
l-1
2
call glTexImage1D, glTexImage2D, glCopyTexImage1D, glCopyTexImage2D, or
glCopyTexImage3DEXT with the level argument indicating the order of the mipmaps.
Level 0 is the original texture; level max(m, n ) is the final 1 1 mipmap. params
supplies a function for minifying the texture as one of the following:
GL_NEAREST
Returns the value of the texture element that is nearest (in Manhattan distance) to the
center of the pixel being textured.
GL_LINEAR
Returns the weighted average of the four texture elements that are closest to the center
of the pixel being textured. These can include border texture elements, depending on the
values of GL_TEXTURE_WRAP_S and GL_TEXTURE_WRAP_T, and on the exact
mapping.
GL_NEAREST_MIPMAP_NEAREST
Chooses the mipmap that most closely matches the size of the pixel being textured and
uses the GL_NEAREST criterion (the texture element nearest to the center of the pixel)
to produce a texture value.
GL_LINEAR_MIPMAP_NEAREST
Chooses the mipmap that most closely matches the size of the pixel being textured and
uses the GL_LINEAR criterion (a weighted average of the four texture elements that are
closest to the center of the pixel) to produce a texture value.
GL_NEAREST_MIPMAP_LINEAR
450
a
for 1D mipmaps, 2
k-1
k-1
or 2
1 until the final mipmap, which has dimension 1 1. To define the mipmaps,
a
b
2
for 2D mipmaps, and 2
l-1
2
, where 2k 2l are the dimensions of the previous
a
b
c
2
2
for 3D
Chapter 18

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents