Next | Prev | Up | Top | Contents | Index
Using 3D Textures
To create a 3D texture, use glTexImage3DEXT(). The function is defined like glTexImage2DEXT() but has a depth argument that specifies how many "slices" the texture consists of. Internal formats are supported.
The extension also provides the following additional features:
- Pixel storage modes. The extension extends the pixel storage modes by adding four new state variables:
- Texture wrap modes. The functions glTexParameter*(), accept the additional token value GL_TEXTURE_WRAP_R_EXT.
It affects the R coordinate in the same way that GL_TEXTURE_WRAP_S affects the S coordinate and GL_TEXTURE_WRAP_T affects the T coordinate. The default value is GL_REPEAT.
- Mipmapping. Mipmapping for two-dimensional textures is discussed in the section "Multiple Levels of Detail," in Chapter 9, "Texture Mapping," of the OpenGL Programming Guide. Mipmapping for 3D textures works the same way: A 3D mipmap is an ordered set of arrays representing the same image; each array has a resolution lower than the previous one. The filtering options GL_NEAREST_MIPMAP_NEAREST, GL_NEAREST_MIPMAP_LINEAR, GL_LINEAR_MIPMAP_NEAREST, and GL_LINEAR_MIPMAP_LINEAR apply to subvolumes instead of texels.
- Proxy textures. Use the proxy texture GL_PROXY_TEXTURE_3D_EXT to query an implementation's maximum configuration. For more information on proxy textures, see "The Texture Extension Proxy Mechanism".
- Querying. Use the following call to query the 3D texture:
glGetTexImage(GL_TEXTURE_3D_EXT)
- Subvolumes of the 3D texture can be replaced using glTexSubImage3DEXT() and glCopyTexSubImage3DEXT() (see "The Subtexture Extension").
Next | Prev | Up | Top | Contents | Index